Image processing apparatus and method, and recording medium and program used therewith

ABSTRACT

For each pixel in an operation block, an effective pixel determining unit sets a predetermined pixel difference (threshold value) on a time-base pixel difference. When the time-base pixel difference is less than the set predetermined pixel difference, it is determined that the pixel contributes to (or are effective in) motion vector detection, and uses the pixel in the gradient method in the case of performing motion vector detection. When the time-base pixel difference is not less than the set predetermined pixel difference, it is determined that the pixel is regarded as having a possibility to generate irregularity in movement, and the pixel is excluded from the gradient operation in the case of performing motion vector detection. The present invention is applicable to a signal processing apparatus for performing frame frequency conversion from a 24 P signal to a 60 P signal.

BACKGROUND OF THE INVENTION

1. Field of the Invention

The present invention relates to image processing apparatuses andmethods, and recording media and programs used therewith. In particular,the present invention relates to an image processing apparatus andmethod that increase accuracy of motion vector detection, and to arecording medium and program used therewith.

2. Description of the Related Art

In an image processing apparatus for converting the frame frequency ofan image, the gradient method described in Japanese Unexamined PatentApplication Publication No. 60-158786 is used as a method for detectinga motion vector in a block of interest. Although the gradient method hasa feature capable of detecting a movement below pixel size by performinga simplified arithmetic operation, the method has bad accuracy fordetection in units of pixels. Accordingly, in an ordinary case, it iscommon that motion vector detection is performed by accumulatingdetected values in units of blocks.

Therefore, conventionally, the gradient operation is performed by usinga pixel of interest, which is subject to motion vector detection, or allpixels in an operation block set in the vicinity of a block of interest.Ideally, when pixels in the operation block have substantiallyequivalent movements, a probable motion vector is detected.

However, pixels in an object having a movement different from that ofthe pixel of interest or the block of interest may come to be mixed intothe operation block. In this case, it is common that improbable motionvectors are detected, thus causing a problem of significantdeterioration in accuracy of motion vector detection. In addition, whenthe detected improbable motion vectors are used to perform framefrequency conversion, a resultant generated image has significant visualdeterioration such as occurrence of noise or discontinuity in a boundarybetween objects in the image.

SUMMARY OF THE INVENTION

The present invention has been made in view of the above circumstance,and it is an object of the present invention to enable improvement inaccuracy of motion vector detection based on the gradient method.

According to an aspect of the present invention, an image processingapparatus includes: an effective pixel determining unit for determiningwhether or not each of pixels in an operation block is effective indetecting a motion vector, the pixels being subject to a gradientoperation for detecting the motion vector; and a gradient operation unitfor performing the gradient operation by using, among the pixels in theoperation block, only pixels determined by the effective pixeldetermining unit to be effective in detecting the motion vector.

The effective pixel determining unit may further include: a temporaldifference calculating unit for calculating a temporal pixel differenceof a pixel in the operation block between a first frame being subject todetection of the motion vector and a second frame following the firstframe. Based on the temporal pixel difference calculated by the temporaldifference calculating unit, the pixels in the operation block aredetected as either effective or non-effecting in detecting the motionvector.

The effective pixel determining unit may further include a temporaldifference determining unit for determining whether or not the temporalpixel difference calculated by the temporal difference calculating unitis less than a predetermined threshold value; and in a case the temporaldifference determining unit determines that the calculated temporalpixel difference is less than the predetermined threshold value, theeffective pixel determining unit determines that the pixels in theoperation block are effective in detecting the motion vector.

The effective pixel determining unit may further include: a firstspatial-difference calculating unit for calculating a first spatialpixel difference of a pixel in the operation block in the first framebeing subject to detection of the motion vector; a secondspatial-difference calculating unit for calculating a second spatialpixel difference of the pixel in the operation block in the second framefollowing the first frame; a temporal difference calculating unit forcalculating a temporal pixel difference of the pixel in the operationblock between the first frame and the second frame; and based on thefirst and second spatial pixel differences respectively calculated bythe first and second spatial-difference calculating units and based onthe temporal pixel difference calculated by said temporal differencecalculating unit, the pixels in the operation block are detected eithereffective or not in detecting the motion vector.

The effective pixel determining unit may further include a gradientsimilarity determining unit for determining whether or not gradientsimilarity of the pixel is less than a predetermined threshold value,the gradient similarity of the pixel being based on the first and secondspatial pixel differences respectively calculated by the first andsecond spatial-difference calculating units and based on the temporalpixel difference calculated by the temporal difference calculating unit;and in a case the gradient similarity of the pixel is less than thepredetermined threshold value, the effective pixel determining unitdetermines that the pixel in the operation block is effective indetecting the motion vector.

The gradient similarity determining unit may determine whether or noteach of horizontal gradient similarity and vertical gradient similarity,and horizontal-and-vertical gradient similarity of the pixel, based onthe first and second spatial pixel differences and the temporal pixeldifference, is less than a predetermined threshold value. In a case thegradient similarity determining unit determines that at least one of thehorizontal gradient similarity and vertical gradient similarity, and thehorizontal-and-vertical gradient similarity of the pixel is less thanthe predetermined value, it may be determined that the pixel in theoperation block is effective in detecting the motion vector.

The gradient similarity determining unit may determine whether or noteach of horizontal gradient similarity and vertical gradient similarityof the pixel based on the first and second spatial pixel differences andthe temporal pixel difference is less than a predetermined thresholdvalue. In a case the gradient similarity determining unit determinesthat both the horizontal gradient similarity and vertical gradientsimilarity of the pixel are less than the threshold value, it may bedetermined that the pixel in the operation block is effective indetecting the motion vector.

The image processing apparatus may further include: a pixel quantitydetermining unit for determining whether or not the number of pixels inthe operation block, which is determined by the effective pixeldetermining unit to be effective in detecting the motion vectors, isless than a predetermined number; and an operation control unit forcontrolling processing of one of the effective pixel determining unitand the gradient operation unit based on the result of determination bythe pixel quantity determining unit.

The operation block may include: a first operation block portion fordetecting the motion vector in units of blocks and a second operationblock portion for detecting the motion vector in units of pixels; theeffective pixel determining units determine whether or not the pixels inthe first operation block portion are effective in detecting the motionvector; and in a case the pixel quantity determining units determinethat the number of pixels in the first operation block portion, which isdetermined to be effective in detecting the motion vector, is greaterthan the predetermined number, the operation control units controls theeffective pixel determining unit and the gradient operation unit toswitch processing on the first operation block portion to processing onthe second operation block portion for pixels in the first operationblock portion that are determined as non-effective in detecting themotion vector.

In a case the pixel quantity determining unit determines that the numberof pixels in the operation block, which is determined by the effectivepixel determining unit to be effective in detecting the motion vector,is less than the predetermined number, the operation control unit maycontrol the gradient operation unit to stop the gradient operation.

The operation block may include a first operation block portion fordetecting the motion vectors in units of blocks and a second operationblock portion for detecting the motion vectors in units of pixels. Theeffective pixel determining unit may determine whether or not the pixelsin the first operation block portion are effective in detecting themotion vectors. The pixel quantity determining unit may determinewhether or not the number of pixels in the first operation block portionwhich is determined by the effective pixel determining unit to beeffective in detecting the motion vectors is less than the predeterminednumber. In a case the pixel quantity determining unit determines thatthe number of pixels in the first operation block portion which isdetermined to be effective in detecting the motion vectors is less thanthe predetermined number, the operation control unit may control theeffective pixel determining unit and the gradient operation unit toswitch processing on the first operation block portion to processing onthe second operation block portion.

According to another aspect of the present invention, an imageprocessing method for an image processing apparatus for detecting motionvectors and generating pixel values based on the detected motion vectorsis provided. The image processing method includes: an effective pixeldetermining step of determining whether or not each of pixels in anoperation block is effective in detecting a motion vector, the pixelsbeing subject to gradient operation for detecting the motion vector; anda gradient operation step of performing the gradient operation by using,among the pixels in the operation block, only pixels determined in theeffective pixel determining step to be effective in detecting the motionvector.

According to another aspect of the present invention, a recording mediumhaving a program recorded thereon is provided. The program allowing acomputer to perform processing for detecting motion vectors andgenerating pixel values based on the detected motion vectors. Theprogram includes: an effective pixel determining step of determiningwhether or not each of pixels in an operation block is effective indetecting the motion vectors, the pixels being subject to gradientoperation for detecting a motion vector; and a gradient operation stepof performing the gradient operation by using, among the pixels in theoperation block, only pixels determined in the effective pixeldetermining step to be effective in detecting the motion vector.

According to another aspect of the present invention, a recording mediumhaving a program recorded thereon is provided. The program allows acomputer to perform processing for detecting motion vectors andgenerating pixel values based on the detected motion vectors. Theprogram comprising: an effective pixel determining step of determiningwhether or not each of pixels in an operation block is effective indetecting a motion vector, the pixels being subject to gradientoperation for detecting the motion vector; and a gradient operation stepof performing the gradient operation by using, among the pixels in theoperation block, only pixels determined in the effective pixeldetermining step to be effective in detecting the motion vector.

According to the present invention, the accuracy of motion vectordetection by the gradient method can be improved. In addition, accordingto the present invention, visual deterioration in a generated image, inparticular, considerable visual deterioration in the vicinity of aboundary having movement can be suppressed.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a block diagram showing an example of the configuration of asignal processing apparatus of the present invention;

FIG. 2 is a block diagram showing the configuration of the signalprocessing apparatus shown in FIG. 1;

FIG. 3 is an illustration of the principle of processing of the presentinvention;

FIG. 4 is a detailed illustration of the processing of the presentinvention;

FIG. 5 is an illustration of an evaluated value used in the signalprocessing apparatus;

FIG. 6 is a flowchart illustrating a frame frequency converting processin the signal processing apparatus;

FIG. 7 is a block diagram showing the configuration of an imageinterpolating unit;

FIG. 8 is a flowchart illustrating an image interpolating process;

FIG. 9 is a block diagram showing the configuration of a vectordetecting unit;

FIG. 10 is an illustration of the gradient method used in the vectordetecting unit;

FIG. 11 is an illustration of a recursive gradient method using aninitial vector;

FIG. 12 is a flowchart illustrating a motion vector detecting process;

FIG. 13 is a block diagram showing the configuration of a shiftedinitial vector allocating unit;

FIG. 14 is an illustration of the concept of a shifted initial vector;

FIG. 15 is a specific illustration of a shifted initial vector;

FIG. 16 is a specific illustration of a shifted initial vector;

FIG. 17 is an illustration of a method for determining a shifted initialvector;

FIG. 18 is an illustration of an example of shifted initial vectorallocation;

FIG. 20 is a flowchart illustrating a shifted initial vector allocatingprocess;

FIG. 21 is a block diagram showing the configuration of a shiftedinitial vector selecting unit;

FIG. 22 is an illustration of a peripheral region around an initialvector;

FIG. 23 is an illustration of a candidate block for an initial vector;

FIG. 24 is a flowchart illustrating an initial vector selecting process;

FIG. 25 is a block diagram showing the configuration of a recursivegradient operation unit;

FIG. 26 is a block diagram showing the configuration of an effectivepixel determining unit;

FIG. 27 is a block diagram showing the configuration of a gradientoperation unit;

FIG. 28 is an illustration of a detection block and operation blockconcerning a motion vector;

FIG. 29 is an illustration of movement of an object in a detectionblock;

FIG. 30 is an illustration of a luminance state in a detection blockhaving objects having the same movement;

FIG. 31 is an illustration of a luminance state in a detection blockhaving objects having different movements;

FIG. 32 is an illustration of an example of an operation block inpixel-unit processing;

FIG. 33 is an illustration of the pixel-unit processing in the detectionblock shown in FIG. 29;

FIGS. 34A-34C are flowcharts illustrating recursive gradient operationprocesses;

FIG. 35 is a flowchart illustrating an effective pixel determiningprocess;

FIG. 36 is a flowchart illustrating the gradient operation process;

FIG. 37 is a flowchart illustrating a pixel-unit recursive gradientoperation process;

FIG. 38 is a block diagram showing another configuration of an effectivepixel determining unit;

FIG. 39 is a block diagram showing another configuration of a gradientoperation unit;

FIG. 40 is an illustration of other examples of a detection block and anoperation block;

FIG. 41 is an illustration of the effective pixel determining methodshown in FIG. 38;

FIG. 42 is an illustration of the configuration of effective pixels inan operation block;

FIG. 43 is a flowchart illustrating another example of the effectivepixel determining process;

FIG. 44 is a flowchart illustrating another example of the effectivepixel determining process;

FIG. 45 is a block diagram showing the configuration of the vectorallocating unit;

FIG. 46 is an illustration of a four-point interpolation process in thepresent invention;

FIG. 47 is an illustration of an overview of the vector allocatingprocess;

FIG. 48 is an illustration of an example of a pixel in a neighborhood ofa point of intersection between a motion vector and an interpolatedframe;

FIG. 49 is an illustration of a method for evaluating a candidate motionvector for allocation;

FIG. 50 is an illustration of an example of four-point interpolation invector allocation;

FIG. 51 is a flowchart illustrating a vector allocating process;

FIG. 52 is a flowchart illustrating a pixel position operation process;

FIG. 53 is a flowchart illustrating an allocated vector evaluatingprocess;

FIG. 54 is a block diagram showing the configuration of an allocationcompensating unit;

FIG. 55 is a block diagram showing the configuration of the allocationcompensating unit;

FIG. 56 is an illustration of the principle of an allocationcompensating process;

FIG. 57 is an illustration of the principle of movement correlation;

FIG. 58 is an illustration of an example of the configuration ofperipheral pixels around a pixel of interest;

FIG. 59 is an illustration of an example of a compensating candidatevector for the motion vector of a pixel of interest;

FIG. 60 is an illustration of an example of a compensating candidatevector for the motion vector of a pixel of interest;

FIG. 61 is an illustration of an example of a compensating candidatevector for the motion vector of a pixel of interest;

FIG. 62 is an illustration of an example of evaluation of a compensatingcandidate vector;

FIG. 63 is an illustration of an example of evaluation of a compensatingcandidate vector;

FIG. 64 is an illustration of an example of evaluation of a compensatingcandidate vector;

FIG. 65 is an illustration of an example of selecting a compensatingcandidate vector as the motion vector of a pixel of interest;

FIG. 66 is a flowchart illustrating an allocation compensating process;and

FIG. 67 is a flowchart illustrating a vector compensating process.

DESCRIPTION OF THE PREFERRED EMBODIMENTS

Embodiments of the present invention are described below with referenceto the accompanying drawings.

FIG. 1 shows an example of the configuration of a signal processingapparatus 1 to which the present invention is applied. The signalprocessing apparatus 1 is formed by, for example, a personal computer orthe like. In FIG. 1, a central processing unit (CPU) 11 executes varioustypes of processing in accordance with programs stored in a read-onlymemory (ROM) 12 or a storage unit 18. A random access memory (RAM) 13stores a program to be executed by the CPU 11 and data, if needed. TheCPU 11, the ROM 12, and the RAM 13 are connected to one another by a bus14.

The CPU 11 connects to an input/output interface 15 through the bus 14.The input/output interface 15 connects to an input unit 16 including akeyboard, a mouse, and a microphone, and to an output unit 17 includinga display and a speaker. The CPU 11 executes various types of processingin response to instructions input from the input unit 16. The CPU 11outputs, to the output unit 17, an image, audio, etc., obtained in theprocessing.

The storage unit 18 connected to the input/output interface 15 is formedby, for example, a hard disk, and stores programs to be executed by theCPU 11, and various types of data. The communication unit 19communicates with an external apparatus through the Internet or othernetworks. A program may be acquired through the communication unit 19and may be stored in the storage unit 18.

When a magnetic disk 31, an optical disk 32, a magnetooptical disk 33,or a semiconductor memory 34 is loaded, a drive 20 connected to theinput/output interface 15 drives the loaded recording medium andacquires a program and data recorded thereon. The acquired program anddata is transferred and stored in the storage unit 18, if needed.

As the signal processing apparatus 1, for example, a television receiveror an optical disk player, or its signal processing unit, can be used.

FIG. 2 is a block diagram showing the signal processing apparatus 1.

The functions of the signal processing apparatus 1 may be realizedeither by hardware or by software. In other words, the block diagrams inthis specification may be regarded either as hardware block diagrams oras software block diagrams.

The signal processing apparatus 1 shown in FIG. 2 receives an imagebased on a progressive image signal (hereinafter referred to as a “24 Psignal”) having a frame frequency of 24 Hz. The signal processingapparatus 1 converts the input image into an image based on aprogressive image signal (hereinafter referred to as a “60 P signal”)having a frame frequency of 60 Hz, and outputs the converted image. Inother words, FIG. 2 shows the configuration of the signal processingapparatus 1, which serves as an image processing apparatus.

The image based on the 24 P signal input to the signal processingapparatus 1 is supplied to a frame memory 51, a vector detecting unit52, a vector allocating unit 54, an allocation compensating unit 57, andan image interpolating unit 58. The frame memory 51 stores the inputimage in units of frames. The frame memory 51 stores a frame at time twhich is anterior to an input image at time t+1. The frame at time t,stored in the frame memory 51, is supplied to the vector detecting unit52, the vector allocating unit 54, the allocation compensating unit 57,and the image interpolating unit 58. In the following description, theframe at time t in the frame memory 51 is hereinafter referred to as“frame t”, and the frame at time t+1 of the input image is hereinafterreferred to as “frame t+1”.

The vector detecting unit 52 detects a motion vector between a block ofinterest in frame t in the frame memory 51 and an object block in framet+1 of the input image, and stores the detected motion vector in thedetected vector memory 53. As a method for detecting the motion vectorbetween the above two frames, a method, such as a gradient method orblock matching, is used. Details of the configuration of the vectordetecting unit 52 are described later. The detected vector memory 53stores the motion detected in frame t by the vector detecting unit 52.

The vector allocating unit 54 allocates the motion vector detected inthe 24 P signal frame t of to a pixel in the 60 P-signal frame forinterpolation in the allocated vector memory 55. In the followingdescription, the 60 P-signal frame is also hereinafter referred to asthe “interpolated frame” in order to be distinguished from the 24 Psignal frame. The vector allocating unit 54 rewrites an allocation flagin the allocation flag memory 56 into one (true). Details of theconfiguration of the vector allocating unit 54 are described later.

The allocated vector memory 55 stores the motion vector allocated by thevector allocating unit 54 in a form in which the allocated motion vectoris associated with each pixel of the interpolated frame. The allocationflag memory 56 stores, for each pixel of the interpolated frame, anallocation flag indicating whether there is an allocated motion vector.For example, when the allocation flag is true (one), it is indicatedthat a motion vector is allocated to a corresponding pixel. When theallocation flag is false (zero), it is indicated that no motion vectoris allocated to a corresponding pixel.

By referring to the allocation flag in the allocation flag memory 56,the allocation compensating unit 57 compensates, to a pixel of interestto which no motion vector is allocated by the vector allocating unit 54,for the motion vectors of peripheral pixels around the pixel ofinterest, and allocates the compensated pixel to the interpolated framein the allocated vector memory 55. At this time, the allocationcompensating unit 57 rewrites the allocation flag in the pixel ofinterest to which the motion vector is allocated so that it is one(true). Details of the allocation compensating unit 57 are describedlater.

The image interpolating unit 58 performs interpolation to generate apixel in the interpolated frame by using the motion vector allocated tothe interpolated frame of the allocated vector memory 55 and pixels inframe t and the next frame t+1. The image interpolating unit 58 outputsa 60 P-signal image to a subsequent stage (not shown) by outputting thegenerated interpolated frame, and subsequently outputting frame t+1, ifneeded. In the following description, a pixel value is also hereinafterreferred to as a “luminance”.

FIG. 3 illustrates the principle of processing performed by the signalprocessing apparatus 1 of the present invention. In the example shown inFIG. 3, the dotted lines indicate 24 P signal frames at times t, t+1,and t+2, and the solid lines indicate generated interpolated 60 P-signalframes at times t, t+0.4, t+0.8, t+1.2, t+1.6, and t+2.

In general, in order to convert a 24 P signal into a 60 P signal,5/2-fold frames are required. In other words, from two 24 P-signalimages, five 60 P-signal images must be generated. In this case,generated 60 P signal interpolated frames are disposed at positionswhere time phases on the 24 P signal are 0.0, 0.4, 0.8, 1.2, and 1.6 inorder to have equal frame intervals. Among these frames, four frames(frames at times t+0.4, t+0.8, t+1.2, and t+1.6), excluding one frame attime t where the time phase is 0.0, are images that do not exist on the24 P signal. Thus, when the 24 P-signal image is input, fourinterpolated frames are generated from two frames at times t and t+1.Therefore, the signal processing apparatus 1 outputs a 60 P-signal imagecomposed of five frames at times t, t+0.4, t+0.8, t+1.2, and t+1.6.

As described above, the signal processing apparatus 1 executes framefrequency conversion for converting a 24 P-signal image to a 60 P-signalimage.

In principle, as described above, from two 24 P signal frames at times tand t+1, five 60 P-signal frames at times t, t+0.4, t+0.8, t+1.2, andt+1.6 are generated. Actually, in the example in FIG. 3, based on two 24P signal frames at times t and t+1, 60 P-signal frames at times t,t+0.4, and t+0.8 are generated. Based on two 24 P signal frames at timest+1 and t+2, 60 P-signal frames at times t+1.2, t+1.6, and t+2 aregenerated.

FIG. 4 is a more specific illustration of the processing of the presentinvention. In the example shown in FIG. 4, the bold arrows indicatechanges of states, and the arrows T indicates directions in which timeelapses in states 81 to 85. States 81 to 85 conceptually representstates of 60 P signal interpolated frames F which are generated, in amode of input/output to/from each unit constituting the signalprocessing apparatus 1, in frame t at time t of the 24 P signal, inframe t+1 at the next time t+1, and between frame t and frame t+1. Inother words, actually, a frame in which motion vectors are detected asindicated by state 82 is not input. Frames and motion vectors areseparately input.

State 81 indicates each state of the 24 P signal frames t and t+1 whichare input to the vector detecting unit 52. The black spots in frame t instate 81 indicate pixels in frame t. The vector detecting unit 52detects positions to which the pixels in frame t in state 81 can move inthe next frame at time t+1, and outputs the movements as motion vectorscorresponding to the pixels, as shown in frame t in state 82. As amethod for detecting the motion vectors between two frames, blockmatching, the gradient method, or the like, is used. When, in this case,a plurality of motion vectors is detected for one pixel, the vectordetecting unit 52 finds evaluated values of the motion vectors(described later), and selects a motion vector based on the evaluatedvalues.

State 82 represents each state of frames t and t+1 which are input tothe vector allocating unit 54. In state 82, the arrows from the pixelsin frame t indicate motion vectors detected by the vector detecting unit52.

The vector allocating unit 54 stretches the motion vectors detected forthe pixels in frame t to the next frame t+1, and finds positions throughwhich the motion vectors pass in an interpolated frame F inpredetermined time phase (e.g., t+0.4 in FIG. 3). This is because,assuming that movements of the motion vectors are constant betweenframes t and t+1, points at which the motion vectors pass through theinterpolated frame F serve as pixel positions in the interpolated frameF. Accordingly, the vector allocating unit 54 allocates one passingmotion vector to four neighboring pixels in the interpolated frame F instate 83. In addition, at this time, there may be a case in which thereis no motion vector depending on a pixel in the interpolated frame F, ora case in which a plurality of motion vectors will serve as compensatingcandidates. In the latter case, similarly to the vector detecting unit52, the vector allocating unit 54 finds evaluated values of motionvectors, and selects, based on the evaluated values, a motion vector tobe allocated.

The state 83 represents each state of frame t, frame t+1, and theinterpolated frame F to which the motion vector is allocated which areinput to the allocation compensating unit 57. In the interpolated frameF in state 83, motion vectors to which the motion vectors are allocatedby the vector allocating unit 54, and pixels to which no motion vectorsare allocated are shown.

The allocation compensating unit 57 compensates, to one pixel in state83 to which no motion vector is allocated, by using the motion vectorsallocated to peripheral pixels around the pixel to which no motionvector is allocated. This is because, if the assumption holds that aneighboring region around a pixel of interest has a similar movement,the motion vectors of peripheral pixels around the pixel of interest,and a motion vector in the pixel of interest have resemblance. Thisprovides a motion vector, which is accurate to some extent, to even apixel to which no motion vector is allocated, so that motion vectors areallocated to all the pixels in the interpolated frame F in state 84.Also in this case, there are the motion vectors of peripheral pixels ascandidates, the allocation compensating unit 57 finds evaluated valuesor the motion vectors similarly to the vector allocating unit 54, andselects, based on the evaluated values, a motion vector to be allocated.

State 84 represents each state of frame t, frame t+1, and theinterpolated frame F to which motion vectors are allocated to all thepixels. These frames are input to the image interpolating unit 58. Basedon the motion vectors allocated to all the pixels, the imageinterpolating unit 58 determines positional relationships between thepixels in the interpolated frame F and the pixels in two frames t andt+1. Accordingly, by using the motion vectors allocated to theinterpolated frame F and the pixels in frames t and t+1, the imageinterpolating unit 58 performs interpolation to generate pixels in theinterpolated frame F, as indicated by the black spots in theinterpolated frame F in state 85. The image interpolating unit 58outputs the 60 P-signal image to the subsequent stage (not shown) byoutputting the generated interpolated frame and subsequently outputtingframe t+1.

Next, evaluated values of motion vectors which are used in the signalprocessing apparatus 1 of the present invention are described below withreference to FIG. 5.

As described with reference to FIG. 4, in the functional units (thevector detecting unit 52, the vector allocating unit 54, and theallocation compensating unit 57) of the signal processing apparatus 1,motion vectors that are optimal for processing in the subsequent stageare selected. In this case, each of the signal processing apparatus 1uses, as an evaluated value of a motion vector, a displaced framedifference (DFD) representing a correlation value between blocks thatare shifted by vector values of interest in two frames.

The example shown in FIG. 5 shows two blocks, that is, an m-by-n blockaround a pixel position p in frame t at time t, and an m-by-n blockaround a pixel position p+v that is shifted from a pixel position inframe t+1 at time t+1 by a vector value of motion vector v of interest.Displaced frame difference DFD_(t)(p) calculated between the two blocksis represented by the following expression (1): $\begin{matrix}{{{DFD}_{t}(p)} = {\sum\limits_{x,y}^{m \times n}{{{F_{t + 1}\left( {p_{x,y} + v} \right)} - {F_{t}\left( p_{x,y} \right)}}}}} & (1)\end{matrix}$where F_(t)(p) represents a luminance at a pixel position p at time t,and m×n represents a DFD operation range (block) for finding a displacedframe difference.

A displaced frame difference represents a correlation value between DFDoperation ranges (blocks) in two frames. Thus, in general, the smallerthe displaced frame difference is, the more the waveforms of the blocksbetween the frames coincide with each other. Therefore, it is determinedthat the smaller the displaced frame difference is, the higher thereliability of motion vector v is. Accordingly, the displaced framedifference is used to select a most probable motion vector from among aplurality of motion vectors.

Therefore, in the following description, in the functional units (thevector detecting unit 52, the vector allocating unit 54, and theallocation compensating unit 57 of the signal processing apparatus 1, adisplaced frame difference (hereinafter also referred to as an“evaluated value DFD”) is used as an evaluated value when a motionvector is selected.

Next, a frame frequency converting process of the signal processingapparatus 1 is described below with reference to the flowchart shown inFIG. 6.

In step S1, a pixel value of frame t+1 at time t+1 of the input imageand a pixel value in anterior frame t at time t of the input image inthe frame memory 51 are input to the vector detecting unit 52. Theprocess proceeds to step S2. At this time, the pixel value of frame t+1at time t+1 of the input image and the pixel value in anterior frame tat time t of the input image in the frame memory 51 are input to thevector allocating unit 54, the allocation compensating unit 57, and theimage interpolating unit 58.

In step S2, the vector detecting unit 52 executes a motion vectordetecting process, and proceeds to step S3. In other words, the vectordetecting unit 52 detects a motion vector between a block of interest inframe t in the frame memory 51, and an object block in the next framet+1, which is an input image. The vector detecting unit 52 stores thedetected motion vector in the detected vector memory 53, and proceeds tostep S3. For detecting the motion vector between two frames, a gradientmethod, block matching, or the like, is used. In addition, when thereare candidate motion vectors, evaluated values DFD of the motion vectorsare found, and a highly reliable motion vector based on the foundevaluated values DFD is detected. In other words, in this case, in ablock of interest from which a motion vector is to be detected, a mostprobable motion vector is selected and detected. Details of the motionvector detecting process in step S2 are described later.

In step S3, the vector allocating unit 54 executes a vector allocatingprocess, and proceeds to step S4. Specifically, the vector allocatingunit 54 allocates the motion vector found in frame t to a pixel ofinterest in an interpolated frame in the allocated vector memory 55,which is subject to interpolation, and rewrites an allocation flag inthe allocation flag memory 56 which corresponds to the pixel having theallocated motion vector so that it is one (true). For example, anallocation flag which is true indicates that a motion vector isallocated to a corresponding pixel, and an allocation flag which isfalse indicates that a motion vector is not allocated to a correspondingpixel. When each pixel has a plurality of candidate motion vectors,evaluated values are found for the motion vectors, and a highly reliablemotion vector based on the evaluated values DFD is allocated. In otherwords, in this case, for a pixel of interest to which a motion vector isto be allocated, a highly reliable motion vector is selected andallocated. Details of the vector allocating process in step S3 aredescribed later.

In step S4, the allocation compensating unit 57 executes an allocationcompensating process, and proceeds to step S5. In other words, in stepS4, by referring to the allocation flag in the allocation flag memory56, the allocation compensating unit 57 compensates, to the pixel ofinterest to which no motion vector is allocated by the vector allocatingunit 54, for a motion vector in a peripheral pixel around the pixel ofinterest, and allocates the obtained pixel to the interpolated frame inthe allocated vector memory 55. At this time, the allocationcompensating unit 57 compensates for the motion vector, and rewrites theallocation flag of the allocated pixel of interest so that it is one(true). When the pixel of interest has a plurality of the motion vectorsof peripheral pixels, evaluated values DFD are found for the motionvectors, and a highly reliable motion vector based on the obtainedevaluated values DFD is allocated. In other words, in this case, for thepixel of interest to which a motion vector is to be allocated, a mostprobable motion vector is selected and allocated. Details of theallocation compensating process in step S4 are described later.

In step S5, the image interpolating unit 58 executes an imagecompensating process.

In other words, in step S5, the image interpolating unit 58 performscompensation to generate a pixel value in the interpolated frame byusing the motion vector allocated to the interpolated frame in theallocated vector memory 55, and pixels in frames t and t+1. The processproceeds to step S6. Details of the image compensating process in stepS5 are described later. In step S6, the image interpolating unit 58outputs a 60 P-signal image to the subsequent stage (not shown) byoutputting the generated interpolated frame, and subsequently outputtingframe t+1, if needed. The process proceeds to step S7.

In step S7, the vector detecting unit 52 determines whether processingon all frames has finished. If it is determined that the processing onall frames has not finished, the process returns to step S1 andrepeatedly performs the subsequent steps. If, in step S7, it isdetermined that the processing on all frames has finished, the vectordetecting unit 52 finishes the frame frequency converting process.

As described above, the signal processing apparatus 1 of the presentinvention detects a motion vector from a frame of a 24 P-signal image,allocates the detected motion vector to a pixel in a 60 P-signal frame,and generates a pixel value in the 60 P-signal frame based on theallocated motion vector. At this time, the signal processing apparatus 1selects a highly reliable motion vector based on evaluated values DFD(displaced frame differences) in each time of processing, and outputsthe motion vector to the subsequent stage. Accordingly, the signalprocessing apparatus 1 can generate a higher quality image since adefect, such as a loss of motion, is suppressed.

Next, details of the image interpolating unit 58 are described belowwith reference to FIG. 7.

FIG. 7 is a block diagram showing the configuration of the imageinterpolating unit 58. The image interpolating unit 58, whoseconfiguration is shown in FIG. 7, performs a process which performsinterpolation to generate pixels of the interpolated frame by usingmotion vectors allocated to the interpolated frame in the allocatedvector memory 55, and the pixels in frames t and t+1, and outputting a60 P-signal image.

In the example in FIG. 7, frame t at time t is input to a spatial filter92-1, while frame t+1 at time t+1 is input to a spatial filter 92-2 anda buffer 95.

The interpolation control unit 91 selects a pixel in the interpolatedframe in the allocated vector memory 55, and, based on a motion vectorallocated to the selected pixel, finds positional relationships (spatialshifts) between the pixel in the interpolated frame and pixels in twoframes t and t+1. Specifically, the interpolation control unit 91 uses apixel in the interpolated frame as a reference, and finds, from aposition in frame t which is associated by a motion vector of the pixel,and the position in frame t which corresponds to the pixel in theinterpolated frame, spatial shifts concerning both frames. Theinterpolation control unit 91 supplies the obtained spatial shifts tothe spatial filter 92-1. Similarly, the interpolation control unit 91uses a pixel in the interpolated frame as a reference, and finds, from aposition in frame t+1 which is associated by a motion vector of thepixel, and the position in frame t+1 which corresponds to the pixel inthe interpolated frame, spatial shifts concerning both frames. Theinterpolation control unit 91 supplies the obtained spatial shifts tothe spatial filter 92-2.

In addition, based on a time phase (time) in the interpolated framewhich is set beforehand, the interpolation control unit 91 finds aninterpolation weight between frames t and t+1, and sets the obtainedinterpolation weight in multipliers 93-1 and 93-2. For example, when thetime in the interpolated frame is at a distance of “k” from the time t+1of frame t+1, and is at a distance of “1−k” from the time t of frame t,that is, when the interpolated frame is generated at a time thatinternally divides times t and t+1 into “1−k”:“k”, the interpolationcontrol unit 91 sets an interpolation weight of “1−k” in the multiplier93-1, and sets an interpolation weight of “k” in the multiplier 93-2.

The spatial filters 92-1 and 92-2 are formed by, for example, cubicfilters or the like. Based on the pixel value of a pixel in frame t,which is input, and the spatial shift supplied from the interpolationcontrol unit 91, the spatial filter 92-1 finds a pixel value in frame twhich corresponds to the pixel in the interpolated frame, and outputsthe obtained pixel value to the multiplier 93-1. Based on the pixelvalue of a pixel in frame t+1, which is input, and the spatial shiftsupplied from the interpolation control unit 91, the spatial filter 92-2finds a pixel value in frame t+1 which corresponds to the pixel in theinterpolated frame, and outputs the obtained pixel value to themultiplier 93-2.

When the position of the pixel in the interpolated frame does notcoincide with the position of the pixel in frame t or frame t+1, thatis, when the position of the interpolated frame has a component equal toor less than the pixel value in frame t or frame t+1, by using the pixelvalues of four adjacent pixels around the pixel in the interpolatedframe in frame t or frame t+1, the spatial filter 92-1 or 92-2 finds thesum of reciprocal ratios of distances to the adjacent pixels, whereby apixel value in the frame which corresponds to the pixel in theinterpolated frame is found. In other words, a pixel value that is equalto or less than a reference pixel value is found by linear interpolationbased on the distances to the adjacent pixels.

The multiplier 93-1 multiplies the pixel value in frame t, which isinput from the spatial filter 92-1, by the interpolation weight “1−k”set in the interpolation control unit 91, and outputs the weighted pixelvalue to an adder 94. The multiplier 93-2 multiplies the pixel value inframe t+1, which is input from the spatial filter 92-2, by theinterpolation weight “k” set in the interpolation control unit 91, andoutputs the weighted pixel value to the adder 94.

The adder 94 generates the pixel value of the pixel in the interpolatedframe by adding the pixel value input from the multiplier 93-1 and thepixel value input from the multiplier 93-2, and outputs the generatedpixel value in the interpolated frame to the buffer 95. The buffer 95buffers the input frame t+1. The buffer 95 outputs the generatedinterpolated frame. Subsequently, by outputting the buffered frame t+1,if needed, based on the time phase (time) of the 60 P frame, which isset beforehand, the buffer 95 outputs the 60 P-signal image to thesubsequent stage (not shown).

Details of the image interpolating process by the image interpolatingunit 58 having the above configuration are described below withreference to the flowchart shown in FIG. 8.

In step S51, based on the time phase of the interpolated frame, which isto be processed, the interpolation control unit 91 finds theinterpolation weights (e.g., “k” and “1−k”) of the interpolated framebetween frames t and t+1, and sets the obtained interpolation weights inthe multipliers 93-1 and 93-2. The process proceeds to step S52. In stepS52, the interpolation control unit 91 selects a pixel in theinterpolated frame in the allocated vector memory 55 and proceeds tostep S53. Pixels in the interpolated frame are selected in rasterscanning order from a top left pixel in the frame.

In step S53, based on a motion vector allocated to the selected pixel,the interpolation control unit 91 finds positional relationships(spatial shifts) between the pixel in the interpolated frame and each ofpixels in two frames t and t+1. The interpolation control unit 91supplies the obtained spatial shifts to the spatial filters 92-1 and92-2, and the process proceeds to step S54. Specifically, in step S53,by using the pixel in the interpolated frame as a reference, from aposition in frame t which is associated by its motion vector, and theposition of the pixel in frame t which corresponds to the pixel in theinterpolated frame, the interpolation control unit 91 finds spatialshifts concerning both frames and supplies the obtained spatial shiftsto the spatial filter 92-1. Similarly, by using the pixel in theinterpolated frame, from a position in frame t+1 which is associated byits motion vector, and the position of the pixel in frame t+1 whichcorresponds to the pixel in the interpolated frame, the interpolationcontrol unit 91 finds spatial shifts concerning both frames and suppliesthe spatial shifts to the spatial filter 92-2.

The pixel value in frame t of the image at time t is input to thespatial filter 92-1, while the pixel value in frame t+1 of the image att+1 is input to the spatial filter 92-2. In step S54, based on the pixelvalues of the pixel in frames t and t+1, and the spatial shift suppliedfrom the interpolation control unit 91, the spatial filters 92-1 and92-2 find pixel values in the frames which correspond to the pixel inthe interpolated frame, and outputs the obtained pixel values to themultipliers 93-1 and 93-2.

In step S55, the multipliers 93-1 and 93-2 use the interpolation weightset by the interpolation control unit 91 to weight the pixel values inthe frames which are input from the multipliers 93-1 and 93-2, andoutput the weighted pixel values to the adder 94. The process proceedsto step S56. Specifically, the multiplier 93-1 multiplies the pixelvalue in frame t which is input from the spatial filter 92-1 by theinterpolation weight “1−k” set by the interpolation control unit 91, andoutputs the weighted pixel value to the adder 94. The multiplier 93-2multiplies the pixel value in frame t+1 which is input from the spatialfilter 92-2 by the interpolation weight “k” set by the interpolationcontrol unit 91, and outputs the weighted pixel value to the adder 94.

In step S56, the adder 94 generates the pixel value of the pixel in theinterpolated frame by adding the pixel value weighted by the multiplier93-1 and the pixel value weighted by the multiplier 93-2. The adder 94outputs the generated pixel value to the buffer 95, and the processproceeds to step S57. In step S57, the interpolation control unit 91determines whether processing on all pixels in the interpolated framehas finished. If the interpolation control unit 91 has determined thatthe processing on all pixels in the interpolated frame has not finished,the process returns to step S52, and repeatedly performs the subsequentsteps. If, in step S57, the interpolation control unit 91 has determinedthat the processing on all pixels in the interpolated frame hasfinished, the image interpolating process ends.

Next, details of the configuration of the vector detecting unit 52 aredescribed below.

FIG. 9 is a block diagram showing the configuration of the vectordetecting unit 52. The vector detecting unit 52, whose configuration isshown in FIG. 9, detects a motion vector in frame t by using frame t attime t of the input image, and frame t+1 at time t+1 of the input image.This detection of the motion vector is executed for each predeterminedblock composed of a plurality of pixels.

A highly reliable motion vector obtained from the result of detectingpast motion vectors is output as an initial vector V0, which serves asan initial value for use in the gradient method, to a recursive gradientoperation unit 103 for each predetermined block by an initial vectorselecting unit 101. Specifically, the initial vector selecting unit 101selects, as candidate vectors for the initial vector, motion vectorsobtained in the past of peripheral blocks, which are stored in thedetected vector memory 53, and shifted initial vectors stored in ashifted initial vector memory 107. The initial vector selecting unit 101finds evaluated values DFD of the candidate vectors by using frame t andframe t+1, and selects a most reliable vector based on the obtainedevaluated values DFD from among the candidate vectors. The initialvector selecting unit 101 outputs the selected vector as the initialvector V0. Details of the configuration of the initial vector selectingunit 101 are described later.

Prefilters 102-1 and 102-2 are formed by lowpass filters or Gaussianfilters. The prefilters 102-1 and 102-2 eliminate noise components fromframe t and frame t+1 of the input image, and output the obtained framesto the recursive gradient operation unit 103.

The recursive gradient operation unit 103 uses the gradient method tocalculate motion vector Vn for each predetermined block by using theinitial vector V0 input from the initial vector selecting unit 101 andframes t and t+1 input through the prefilters 102-1 and 102-2. Therecursive gradient operation unit 103 outputs initial vector V0 and thecalculated motion vector Vn to the vector evaluating unit 104. Inaddition, the recursive gradient operation unit 103 calculates themotion vector Vn by recursively performing the gradient operation basedon the result of motion vector evaluation by the vector evaluating unit104. Details of the configuration of the recursive gradient operationunit 103 are described below.

The vector evaluating unit 104 finds evaluated values DFD of the motionvector Vn−1 (or the initial vector V0) from the recursive gradientoperation unit 103 and the motion vector Vn, and controls the recursivegradient operation unit 103 based on the obtained evaluated values DFDto recursively perform the gradient operation. Finally, the vectorevaluating unit 104 selects a highly reliable vector based on theevaluated values DFD, and stores the selected vector as motion vector Vin the detected vector memory 53. Then, the vector evaluating unit 104supplies the shifted initial vector allocating unit 105 with theevaluated value DFD of the motion vector V together with the motionvector V.

When the shifted initial vector allocating unit 105 is supplied with themotion vector V and the evaluated value DFD therefor from the vectorevaluating unit 104, in the shifted initial vector allocating unit 105,a motion vector that passes through a block of interest in the nextframe is set as a shifted initial vector that is shifted to the block ofinterest. In other words, the shifted initial vector allocating unit 105sets, as the shifted initial vector, a motion vector having, as aninitial point, a block of interest in the next frame which is identicalin position to a block at a terminal point of the motion vector V, andbeing identical in magnitude and orientation to the motion vector V. Theshifted initial vector allocating unit 105 allocates the set shiftedinitial vector to the shifted initial vector memory 107 in a formassociated with the block of interest.

Specifically, the shifted initial vector allocating unit 105 stores, inthe evaluated value memory 106, the evaluated value DFD of the motionvector V allocated as the shifted initial vector in a form associatedwith the block of interest. The shifted initial vector allocating unit105 compares the evaluated value DFD with an evaluated value DFD ofanother motion vector V passing through the same block of interest(i.e., a block in a past frame which is identical in position to theblock of interest is used as a terminal point). Subsequently, theshifted initial vector allocating unit 105 shifts the motion vector V,which is highly reliable based on the evaluated value DFD, to the blockof interest, and allocates the shifted motion vector as a shiftedinitial vector in the block of interest to the shifted initial vectormemory 107. Details of the configuration of the shifted initial vectorallocating unit 105 are described later.

Next, the principle of the gradient method used in the vector detectingunit 52 is described below.

At first, in a moving image, the luminance of a pixel at coordinates (x,y, t) is represented by g(x, y, t). When a pixel of interest atcoordinates (x₀, y₀, t₀) is displaced by (dx, dy, dt) in a minute time,by representing horizontal, vertical, and time-base gradients(differences in difference) by gx (x₀, y₀, t₀), gy (x₀, y₀, t₀), gt (x₀,y₀, t₀), respectively, the luminance of the displaced pixel isrepresented in Taylor expansion approximation by the followingexpression (2):g(x₀+dx, y₀+dy, t₀+dt) g(x0, y0, t0)+gx(x0, y0, t0)dx+gy(x0, y0,t0)dy+gt(x0, y0, t0)dt   (2)

When a pixel of interest in the moving image is moved after one frame byhorizontal distance vx and vertical distance vy (hereinafter referred toas “(vx, vy)”), the luminance of the pixel is represented by thefollowing expression (3):g(x ₀ +vx, y ₀ +vy, t ₀+1)=g(x0, y0, t0)   (3)

By substituting Expression (2) for Expression (3), Expression (3) isrepresented by the following expression:gx(x0, y0, t0)vx+gy(x0, y0, t0)vy+gt(x0, y0, t0)=0   (4)

Expression (4) has two variables, vx and vy. Thus, it is impossible thata single expression for one pixel of interest is solved. Accordingly, asdescribed below, a block that is a peripheral region around the pixel ofinterest is regarded as one processing unit, and assuming that allpixels in the block (peripheral region) perform the same movement (vx,vy), a similar expression is written for each pixel. By using theassumption as a condition, for the two variables, the number ofexpressions, which is equal to the number of peripheral pixels, can beobtained. Therefore, the obtained expressions are simultaneously solvedto find a value (vx, vy) in which the sum of the squares ofmotion-compensated frame differences of all the pixels in the block isthe least.

When the pixel (x, y, t) is moved by the value (vx, vy) during oneframe, the motion-compensated interframe difference d is represented ythe following expression: $\begin{matrix}{d = {{{g\left( {{x + {vx}},{y + {vy}},{t + 1}} \right)} - {g\left( {x,y,t} \right)}} = {{\Delta\quad{xvx}} + {\Delta\quad{yvy}} + {\Delta\quad t}}}} & (5)\end{matrix}$where Δx=gx(x, y, t), which represents a horizontal gradient, Δy=gy(x,y, t), which represents a vertical gradient, and Δt=gt(x, y, t), whichrepresents a temporal gradient.

By using these and representing the sum of the squares of themotion-compensated interframe difference by E, E is represented by thefollowing expression: $\begin{matrix}\begin{matrix}{E = {\Sigma\quad d^{2}}} \\{= {\Sigma\left( {{\Delta\quad x^{2}{vx}^{2}} + {\Delta\quad y^{2}{vy}^{2}} +} \right.}} \\\left. {{2\Delta\quad x\quad\Delta\quad{yvxvy}} + {2\Delta\quad x\quad\Delta\quad{tvx}} + {2\Delta\quad y\quad\Delta\quad{tvy}} + \quad{\Delta\quad t^{2}}} \right) \\{= {{{vx}^{2}{\Sigma\Delta}\quad x^{2}} + {{vy}^{2}{\Sigma\Delta}\quad y^{2}} + {2{vxvy}\quad{\Sigma\Delta}\quad x\quad\Delta\quad y} +}} \\{{2{vx}\quad{\Sigma\Delta}\quad x\quad\Delta\quad t} + {2{vy}\quad{\Sigma\Delta}\quad y\quad\Delta\quad t} + {{\Sigma\Delta}\quad t^{2}}}\end{matrix} & (6)\end{matrix}$

In Expression (6), the value (vx, vy) in which E is the least isobtained when a partial differential value in each variable is zero,that is, when the condition ΔE/Δvx=ΔE/Δvy=0 holds. Thus, from Expression(6), the following expressions are obtained:vxΣΔx ² +vyΣΔxΔy+ΣΔxΔt=0   (7)vyΣΔy ² +vxΣΔxΔy+ΣΔyΔt=0   (8)

From Expressions (7) and (8), the value (vx, vy), which is a motion tobe detected, can be calculated by solving the following expression:$\begin{matrix}{{{vx} = {- \frac{{\left( {{\Sigma\Delta}\quad y^{2}} \right)\left( {{\Sigma\Delta}\quad t\quad\Delta\quad x} \right)} - {\left( {{\Sigma\Delta}\quad x\quad\Delta\quad y} \right)\left( {{\Sigma\Delta}\quad t\quad\Delta\quad y} \right)}}{{\left( {{\Sigma\Delta}\quad x^{2}} \right)\left( {{\Sigma\Delta}\quad y^{2}} \right)} - \left( {{\Sigma\Delta}\quad x\quad\Delta\quad y} \right)^{2}}}}{{vy} = {- \frac{{\left( {{\Sigma\Delta}\quad x^{2}} \right)\left( {{\Sigma\Delta}\quad t\quad\Delta\quad y} \right)} - {\left( {{\Sigma\Delta}\quad x\quad\Delta\quad y} \right)\left( {{\Sigma\Delta}\quad t\quad\Delta\quad x} \right)}}{{\left( {{\Sigma\Delta}\quad x^{2}} \right)\left( {{\Sigma\Delta}\quad y^{2}} \right)} - \left( {{\Sigma\Delta}\quad x\quad\Delta\quad y} \right)^{2}}}}} & (9)\end{matrix}$

FIG. 10 is used for a specific description. In the example in FIG. 10,the arrow X indicates a horizontal direction, and the arrow Y indicatesa vertical direction. In addition, the arrow T indicates a direction oflapse of time from frame t at time t, which is positioned on the rightside of the background of FIG. 10, to frame t+1 at time t+1, which ispositioned on the left side of the foreground of FIG. 10. In the examplein FIG. 10, in each frame, only a region of eight pixels by eight pixelsfor use in the gradient operation is shown as a peripheral region(block) around a pixel of interest, denoted by reference letter p.

When, in frame t, the motion vector V(vx, vy) of the pixel p ofinterest, which is positioned in the fifth row downward from the topleft pixel and in the fifth column from the top left pixel to the right,is found by using the gradient method, by finding differences (i.e.,gradients) Δx and Δy in luminance difference between adjacent pixels pxand py, which are obtained in x- and y-directions of the pixel ofinterest, time-base difference Δt (gradient) in luminance differencewith respect to a pixel q positioned in phase with the pixel q ofinterest, which is obtained in frame t+1, for each of all the pixels inthe peripheral region (8 by 8 pixels) around the pixel p of interest,and using Expression (9) to perform operations based on the differencesin luminance difference, motion vector V(vx, vy) can be calculated.

In other words, in the gradient method, gradients Δx, Δy, and Δt betweentwo frames are calculated, and, from the obtained Δx, Δy, and Δt, motionvector V(vx, vy) is statistically calculated by using the sum of thesquares of the differences.

In general, in motion vector detection using the above gradient method,a highly accurate result is obtained for a minute movement. However,when a movement is found in an actual moving image, this gradient methodis not practical since the amount of the movement in the image is toolarge. For eliminating this defect, it is possible that the gradientmethod be recursively performed a plural number of times. By recursivelyexecuting the gradient method, the amounts of movements in operationsconverge. Thus, an accurate movement is gradually calculated.

Nevertheless, only recursively performing the gradient method is notpractical from the aspect of operation time when realtime processing isperformed. Accordingly, in the vector detecting unit 52, an initialvector found based on movement of a peripheral pixel between past andcurrent frames is used as an initial value, thus reducing the number oftimes the gradient method is recursively performed. In other words, bycalculating, from a pixel of interest which serves as an initial pointof movement, a rough movement by adding an offset beforehand to aposition represented by the initial vector, and performing operationsusing the gradient method from the position having the added offset,fine adjustment, including a movement within a pixel, can be performed.This enables detection of an accurate motion vector without increasingthe operation time.

FIG. 11 is a specific illustration of a recursive gradient methodexecuted by using an initial vector. In the example shown in FIG. 11,the arrow T indicates lapse of time from frame t at time t, which isshown on the left side of the foreground, to frame t+1 at time t+1,which is shown on the right side of the background. Blocks whose centersare respectively pixels p, q0, q1, q2, and q3 indicate peripheralregions (blocks) for use in gradient operation for the pixels.

In the example in FIG. 11, for pixel p of interest in frame t, in framet+1, not pixel q0 positioned in phase with pixel p of interest, butinitial vector v0 found beforehand is offset (moved) to calculateposition (pixel) q1. First gradient operation is performed, with theposition q1 as an initial point. This produces motion vector v1.

Next, second gradient operation is performed by using, as an initialpoint, a position calculated by offsetting v0+v1 from pixel q0. Thisproduces motion vector v2. Accordingly, motion vector V is found as thefollowing expression:V=v0+v1+v2   (10)

As described above, by using an initial vector to execute gradientoperation, a highly accurate motion vector can be calculated whilereducing the required operation time.

Next, details of the motion vector detecting process are described belowwith reference to the flowchart shown in FIG. 12.

The vector detecting unit 52 receives frame t at time t, which is input,and frame t+1 at time t+1, which is input.

In step S101, the initial vector selecting unit 101 selects a block inframe t, which is subject to processing, as a block of interest, and theprocess proceeds to step S102. In the frame, processing is executed inraster scanning order from a top left block.

In step S102, the initial vector selecting unit 101 executes the initialvector selecting process. The initial vector selecting unit 101 selectsa highly reliable motion vector from the results of detecting pastmotion vectors for each set of blocks in step S101, outputs the selectedmotion vector as initial vector V0, which serves an initial value foruse in the gradient method, to the recursive gradient operation unit103. The process proceeds to step S103.

In other words, in the initial vector selecting unit 101, the motionvectors of the peripheral blocks stored in the detected vector memory 53after being found in a gradient operation evaluating process (step S103described below) in the past, and the shifted initial vectors stored inthe shifted initial vector memory 107 by a shifted initial vectorallocating process (step S104 described below) in the past are selectedas initial candidate vectors. The initial vector selecting unit 101 usesframe t and frame t+1 to find evaluated values DFD of the candidatevectors, selects from the candidate vectors a highly reliable vectorbased on the obtained evaluated values DFD, and outputs the selectedvector as the initial vector V0. Details of the initial vector selectingprocess in step S102 are described below.

In step S103, the recursive gradient operation unit 103 and the vectorevaluating unit 104 execute a recursive gradient operation evaluatingprocess (hereinafter also referred to as a “recursive gradient operationprocess”), and proceeds to step S104. Specifically, in step S103, byusing the initial vector V0 input from the initial vector selecting unit101 and frame t and frame t+1 respectively input through the prefilters102-1 and 102-2, the recursive gradient operation unit 103 recursivelyperforms the gradient operation to calculate motion vector Vn based onthe results of motion vector evaluation. In addition, the vectorevaluating unit 104 finds evaluated values DFD of motion vector Vn−1 andmotion vector Vn, selects a highly reliable motion vector based on theobtained evaluated values DFD, and stores the selected motion vector asthe motion vector V in the detected vector memory 53. At this time, thevector evaluating unit 104 supplies the shifted initial vectorallocating unit 105 with the evaluated values DFD of the motion vector Vtogether with the motion vector V. Details of the recursive gradientoperation in step S103 are described later.

In step S104, the shifted initial vector allocating unit 105 executesthe shifted initial vector allocating process, and proceeds to stepS105. When the shifted initial vector allocating unit 105 is suppliedwith the motion vector V and the evaluated value DFD thereof from thevector evaluating unit 104, in step S104, in the shifted initial vectorallocating unit 105, a motion vector that passes through a block ofinterest in the next frame is set as a shifted initial vector that isshifted to the block of interest. In other words, a motion vectorhaving, as an initial point, a block of interest in the next frame whichis identical in position to a block at a terminal point of motion vectorV, and being identical in magnitude and orientation to motion vector V,is set as the shifted initial vector. The shifted initial vectorallocating unit 105 allocates the set shifted initial vector to theshifted initial vector memory 107 in a form associated with the block ofinterest.

Specifically, the shifted initial vector allocating unit 105 performsstoring, in the evaluated value memory 106, the evaluated value DFD ofmotion vector V allocated as the shifted initial vector in a formassociated with the block of interest, comparing the stored evaluatedvalue DFD with an evaluated value DFD of another motion vector V passingthrough the same block of interest (i.e., a block in a past frame whichis identical in position to the block of interest), shifting the highlyreliable motion vector V (based on the evaluated value DFD) to the blockso as to be the shifted initial vector, and allocating the shiftedinitial vector to the shifted initial vector memory 107 in a formassociated with the shifted block. Details of the configuration of theshifted initial vector allocating unit 105 are described later.

In step S105, the initial vector selecting unit 101 determines whetherprocessing on all the blocks of frame t has finished. If it isdetermined that the processing on all the blocks of frame t has notfinished, the process returns to step S101 and repeatedly performs thesubsequent steps. If, in step S105, the initial vector selecting unit101 has determined that the processing on all the blocks of frame t hasfinished, that is, if the initial vector selecting unit 101 hasdetermined that, in each of all the blocks of frame t, motion vectors Vhave been detected, the motion vector detecting process ends.

As described above, an initial vector is selected from among motionvectors detected in the past, and the gradient operation is used basedon the selected initial vector to repeatedly calculate a motion vector.From the calculated motion vectors, a highly reliable (i.e., mostprobable) motion vector based on an evaluated value DFD is detected. Asa result, in the detected vector memory 53, motion vectors V for all theblocks of frame t are stored.

Next, details of the configuration of the shifted initial vectorallocating unit 105 are described below.

FIG. 13 is a block diagram showing the configuration of the shiftedinitial vector allocating unit 105. The shifted initial vectorallocating unit 105, whose configuration is shown in FIG. 13, performssetting a shifted initial vector, which serves as an initial candidatevector, based on the motion vector V detected by the vector evaluatingunit 104, and allocating the set shifted initial vector to the shiftedinitial vector memory 107. The motion vector V detected by the vectorevaluating unit 104 and the evaluated value DFD of the motion vector Vare input to the shifted initial vector allocating unit 105.

The allocation position calculating unit 201 performs operation to findthe position of a block through which the motion vector V detected bythe vector evaluating unit 104 passes in a frame at the next time, thatis, the position of a block in the next frame which is identical inposition to a block at the terminal point of motion vector V detected inthe current frame, and supplies the calculated position of the block tothe evaluated value memory 106 and the shifted initial vector replacingunit 203.

When motion vector V and the evaluated value DFD of the motion vector Vare input, the evaluated value comparing unit 202 reads, from theevaluated value memory 106, the evaluated value DFD at the position ofthe block from the allocation position calculating unit 201. Theevaluated value comparing unit 202 compares the evaluated value DFD readfrom the evaluated value memory 106 and the evaluated value DFD of themotion vector V detected by the vector evaluating unit 104. Whendetermining that the evaluated value DFD of the detected motion vector Vis less, the evaluated value comparing unit 202 controls the shiftedinitial vector replacing unit 203 to rewrite the shifted initial vector,in the shifted initial vector memory 107, at the position of the blocksupplied by the shifted initial vector allocating unit 105 by motionvector V determined to be highly reliable, which is based on theevaluated value DFD. At the same time, the evaluated value comparingunit 202 controls the evaluated value replacing unit 204 to rewrite theevaluated value DFD of the position of the block selected by theallocation position calculating unit 201 by the evaluated value DFD ofmotion vector V.

The shifted initial vector replacing unit 203 rewrites the shiftedinitial vector, in the shifted initial vector memory 107, at theposition of the block supplied by the allocation position calculatingunit 201 by the motion vector V supplied from the evaluated valuecomparing unit 202, that is, a motion vector identical in magnitude andorientation to the motion vector V. Under the control of the evaluatedvalue comparing unit 202, the evaluated value replacing unit 204rewrites the evaluated value DFD of the position of the block selectedby the allocation position calculating unit 201 by the evaluated valueDFD of motion vector V.

The evaluated value memory 106 stores, in units of blocks, the evaluatedvalues DFD in the next frame for initial candidate vectors allocated tothe blocks. In the shifted initial vector memory 107, a motion vectorwhose evaluated value DFD is the smallest in each block in the nextframe is stored as a shifted initial vector so as to be associated withthe block.

FIG. 14 is a one-dimensional illustration of the shifted initial vectorallocated by the shifted initial vector allocating unit 105. In theexample shown in FIG. 14, frame t−1 at time T=t−1, frame t at time T=t,and frame t+1 at time T=t+1 are shown in order from the top. Partitionsin the frames indicate block boundaries in the frames.

In the example in FIG. 14, a motion vector detected in block B in framet−1 is represented by motion vector V (the solid line arrow in FIG. 14),and a motion-compensated block (hereinafter referred to as an “offsetblock”) in frame t based on the motion vector V, whose initial point isblock B, is represented by block Bt. In addition, a motion vectorobtained by shifting the motion vector V in frame t−1 to block Bt isrepresented by shifted initial vector SV (the dotted line arrow in FIG.14). In this case, the offset block represents block Bt, which isidentical in position to a block at the terminal point of the motionvector V detected in frame t−1. The term “shift” means that the initialpoint of a motion vector identical in orientation to the motion vector Vdetected in frame t−1 is used as block Bt in frame t, which is identicalin position to a block at the terminal point of the motion vector V inframe t−1. In other words, the shifted initial vector SV is a motionvector having, as an initial point, the block Bt in frame t which isidentical in position to the block at the terminal point of the motionvector V detected in frame t−1.

In general, between sequential frames, the amount of movement of amoving object has a certain level of continuity and slightly changes.Thus, in the example in FIG. 14, when an object on block B moves atconstant speed or speed close thereto, in many cases, also the motionvector in the block Bt serves as the motion vector V or a motion vectorclose thereto.

Therefore, in the case of detecting the motion vector of the block Bt ofinterest, by using this shifted initial vector SV as an initialcandidate vector to be given for the gradient operation, a moreappropriate initial vector can be obtained in motion vector detection bythe gradient operation, compared with the case of using only the motionvector of a peripheral block as an initial candidate vector.

The foregoing is specifically described below with reference to FIGS. 15and 16. In FIGS. 15 and 16, in each frame, nine blocks are shown.

FIG. 15 shows examples of a block through which an object having largemovement passes, and the motion vectors of peripheral blocks. In thecase of FIG. 15, an image object of an object O1 formed by one block hasmotion vector V1 having a large movement, and moves from the rightmostend block (the ninth block from the left) in frame t−1 to the leftmostblock in frame t+1 via the fifth block from the left in frame t. Inaddition, object O2 formed by four blocks has motion vector V2, whichhas a movement less than that of motion vector V1, moves from the thirdto sixth (four) blocks from the left in frame t−1 to the fifth to eighth(four) blocks from the left in frame t+1 via the fourth to seventh(four) blocks from the left in frame t+1. In other words, in the fifthblock from the left in frame t, the image object of object O1 and theimage object of object O2 cross each other, with the image object ofobject O1 positioned anteriorly.

At this time, in order to detect, in frame t, the motion vector of thefifth block from the left, in which the image object of object O1 passesas motion vector V1, if an initial vector is extracted from movement ofa peripheral block, no appropriate motion vector exists since the imageobject of object O2 passes in the peripheral block (the fourth or sixthblock) in the form of vector V2, which differs from that of the imageobject of object O1. Even in such a case, shifted initial vector SV1(indicated by the dotted line arrow in FIG. 15) is a motion vector(i.e., a motion vector which is identical in magnitude and orientationto the motion vector V1, and whose initial point is a block (in frame t)identical in position to a block at the terminal point of the motionvector V1 detected in frame t−1) obtained by shifting the motion vectorV1 detected in past frame T−1 to the fifth block from the left in framet. Thus, it is ensured that the shifted initial vector SV1 can beacquired.

FIG. 16 shows examples of blocks on the boundaries of moving objects,and the motion vectors of peripheral blocks. In the case shown in FIG.16, the image object of object O3 formed by one block has motion vectorV3, and moves from the sixth block from the left at frame t−1 to thefourth block from the left in frame t+1 via the fifth block from theleft in frame t. In addition, the image object of object O4 formed by atleast nine blocks has motion vector V4, which differs from motion vectorV1, moves from all the nine blocks in frame t−1 to the third to ninth(seven) blocks from the left in frame t+1 via the second to ninth(eight) blocks from the left in frame t. In other words, the imageobject of the object O3 passes in front of the image object of theobject O4 in the sixth block from the left in frame t−1, the fifth blockfrom the left in frame t, and the fourth block from the left in framet+1.

At this time, if the initial vector is extracted from movement of theperipheral block in order to detect the motion vector of the fifth blockfrom the left, in which the image object of the object O3 passes in theform of the motion vector V3, no appropriate motion vector exists since,in the peripheral block (fourth or sixth block from the left), the imageobject of an object O4 passes in the form of the motion vector V4, whichdiffers from the image object of object O3. However, also in this case,similarly to the case in FIG. 15, the shifted initial vector SV3(indicated by the dotted line arrow) is a vector obtained by shiftingthe motion vector V3 detected in past frame t−1 to the fifth block fromthe right in frame t, that is, the obtained vector is identical inmagnitude and orientation to the motion vector V3, and having, as aninitial point, a block in frame t which is identical in position to ablock at the terminal point of the motion vector V3 detected in framet−1. Thus, it is ensured that the shifted initial vector SV3 isacquired.

As described above, regarding the object having large movement, as shownin FIG. 15, and a boundary of the moving object, as shown in FIG. 16, inmany cases, a peripheral block, which can serve as an initial candidatevector in a block of interest from which a motion vector is to bedetected, has no optimal motion vector as the initial vector in theblock of interest. Conversely, the shifted initial vector does notdepend on the spatial distance between blocks since the shifted initialvector is a motion vector that is identical in magnitude and orientationto a motion vector whose initial point is a block in frame t which isidentical in position to a block at the terminal point of the motionvector detected in past frame t−1. Thus, even if, in the peripheralblock, no appropriate motion vector exist as the initial vector in theblock of interest, it is ensured that the shifted initial vector isobtained, and the shifted initial vector can be used as an opticalinitial candidate vector.

Referring back to FIG. 14, a method for determining the shifted initialvector is described below.

In the case shown in FIG. 14, in the case of searching for a motionvector that passes in the block Bt of interest while using, as areference, the block Bt of interest in frame t, which is subject to themotion vector detecting process, the motion vectors of all the blocks inframe t−1 must be searched for. This requires a large amount ofprocessing. Therefore, in this case, when motion vector detection isperformed, the huge number of operations required for the large amountof processing must be performed. Thus, it is difficult to implement (inthe form of hardware) the large amount of processing.

Accordingly, when performing motion vector detection in frame t−1, theshifted initial vector allocating unit 105 finds the position of a block(i.e., a block in frame t which is identical in position to a block atthe terminal point of motion vector V) in which the motion vector Vdetected in block Bt of interest passes in frame t at the next time, andallocates motion vector V beforehand as shifted initial vector SV forblock Bt. This reduces the number of operations for searching for theshifted initial vector that is required for motion vector detection inframe t, and establishes the hardware required therefor. Therefore,actually the shifted initial vector can be used as an initial candidatevector.

The method for determining the shifted initial vector by the shiftedinitial vector allocating unit 105 is specifically described below withreference to FIG. 17.

In the example shown in FIG. 17, the arrow T indicates lapse of timefrom the anterior left frame t−1 at time t−1 to the background rightframe t at time t. The circles in the frames indicate pixels.

In frame t−1, block B0 consists of four by four pixels. When a motionvector detected in block B0 is represented by Vb, an offset block (blockin frame t which is identical in position to a block at the terminalpoint of motion vector Vb of block B0) A0 that is obtained by offsetting(performing motion compensation on) block B0 so as to be in frame t, ingeneral, overlaps with four blocks Bt1 to Bt4 in frame t, eachconsisting of four by four pixels. Accordingly, in the case in FIG. 17,all the four blocks in blocks Bt1 to Bt4 that overlaps with the offsetblock A0 serve as blocks to which the motion vector Vb is to beallocated.

As described above, the motion vector detected in the previous frame isallocated as a shifted initial vector. In this case, the position ofblock to be allocated depends on the magnitude and orientation of themotion vector. Accordingly, as shown in FIG. 18, depending on thedistribution of motion vectors detected in frame t−1, in frame t, pluralshifted initial vectors are subject to allocation, so that conflictingblocks and, conversely, blocks to which no shifted initial vectors areallocated are generated.

FIG. 18 shows an example of shifted initial vector allocation. In theexample shown in FIG. 18, each partition between frames indicates ablock boundary. In frame t−1, blocks B1 to B5 are shown from the left inFIG. 18, and, in frame t, blocks Bt1 to Bt5 are shown from the left inFIG. 18.

In block B1, motion vector V1 is detected, and offset block A1 for blockB1 overlaps with blocks Bt1 and Bt2 in frame t. In block B2, motionvector V2 is detected, offset block A2 for block B2 overlaps with blocksBt1 and Bt2 in frame t. In block B3, motion vector V3 is detected, andoffset block A3 for block B3 overlaps with blocks Bt4 and Bt5 in framet. In block B4, motion vector V4 is detected, and offset block A4 forblock B4 overlaps with blocks Bt4 and Bt5. In block B5, motion vector V5is detected, and offset block A5 for block B5 overlaps with block Bt5and an adjacent block (not shown) in frame t.

In other words, in the case in FIG. 18, one of the motion vectors V1 andV2 is allocated as a shifted initial vector to blocks Bt1 and Bt2. Oneof the motion vectors V3 and V4 is allocated as a shifted initial vectorto block Bt4 in frame t. One of the motion vectors V3, V4, and V5 isallocated as a shifted initial vector to block Bt5 in frame t. However,in block Bt3 in frame t, a motion vector to be used as a candidateshifted initial vector does not exist. Accordingly, no shifted initialvector is allocated.

Therefore, the shifted initial vector allocating unit 105 allocates azero vector as a shifted initial vector to a block to which no shiftedinitial vector is allocated, such as block Bt3. In addition, the shiftedinitial vector allocating unit 105 selects a highly reliable motionvector based on the above-described evaluated value evaluated value DFDof a block in which plural motion vectors conflict mutually, such asblocks Bt1, Bt2, Bt4, and Bt5, and allocates the selected motion vectoras an shifted initial vector to each block.

In the case in FIG. 18, for brevity of description, the offset blocks Aare shown in a form slightly shifted from frame t.

FIG. 19 is an illustration of examples of conflicting motion vectors. Inthe case shown in FIG. 19, from blocks B1 and B2 in frame t−1, motionvectors V1 and V2 detected therein pass in block Bt in frame t. In otherwords, block Bt is a block in frame t that is identical in position tothe terminal point of the motion vector V1 in frame t−1, and is a blockin frame t that is identical in position to the terminal point of thevector V2 in frame t−1. As described above, when plural motion vectorsconflict mutually for the same block, an evaluated value DFD1 for themotion vector V1 and an evaluated value DFD2 for the vector V2 arecompared, and one motion vector whose evaluated value DFD is less, thatis, a higher reliable motion vector, is selected as shifted initialvector SV2 for block Bt. This makes it possible to obtain a highlyreliable shifted initial vector based on evaluated value DFD.

Next, details of a shifted initial vector allocating process aredescribed below with reference to the flowchart shown in FIG. 20.

When, in the previous stage, the vector evaluating unit 104 detects themotion vector V of the block of interest in frame t−1, the vectorevaluating unit 104 supplies the shifted initial vector allocating unit105 with the evaluated value DFD obtained for the detected motion vectorV as well as the motion vector V.

In step S201, the motion vector V and the evaluated value DFD thereforare input from the vector evaluating unit 104 to the evaluated valuecomparing unit 202. In addition, at this time, the motion vector V isinput to the allocation position calculating unit 201, and the processproceeds to step S202. In step S202, the evaluated value comparing unit202 finds the position of a block in frame t which is to be offset(motion-compensated) and which is subject to allocation. In other words,the allocation position calculating unit 201 finds the position of eachblock in frame t which is identical in position to a block at theterminal point of the motion vector V detected in frame t−1. The processproceeds to step S203. In step S203, the allocation position calculatingunit 201 selects one allocation block (which is subject to allocation)from among the obtained allocation blocks. The allocation positioncalculating unit 201 supplies the selected allocation block to theevaluated value memory 106 and the shifted initial vector replacing unit203. The process proceeds to step S204. In step S203, the allocationblocks are sequentially selected from the top left block in frame t.

In step S204, the evaluated value comparing unit 202 acquires anevaluated value DFD of the selected allocation block from the evaluatedvalue memory 106. The process proceeds to step S205. In step S205, it isdetermined whether or not the evaluated value DFD of the motion vector Vinput in step S201 is less than the evaluated value DFD in the evaluatedvalue memory 106, that is, whether or not the evaluated value DFD of themotion vector V is higher in reliability than the evaluated value DFD inthe evaluated value memory 106. If it is determined that the evaluatedvalue DFD of the motion vector V is less than the evaluated value DFD inthe evaluated value memory 106, the process proceeds to step S206.

In step S206, the evaluated value comparing unit 202 controls theshifted initial vector replacing unit 203 to rewrite the shifted initialvector of the allocation block (in the shifted initial vector memory107) selected by the allocation position calculating unit 201 by themotion vector V, that is, a motion vector identical in magnitude andorientation to the motion vector V. Proceeding to step S207, theevaluated value comparing unit 202 controls the evaluated valuereplacing unit 204 to rewrite the evaluated value DFD of the allocationblock selected by the allocation position calculating unit 201 by theevaluated value DFD of the motion vector V. The process proceeds to stepS208.

If, in step S205, it is determined that the evaluated value DFD of themotion vector V input in step S201 is not less than the evaluated valueDFD stored in the evaluated value memory 106, steps S206 and S207 areskipped over, and the process proceeds to step S208. In other words, inthis case, it is determined that the evaluated value DFD in theevaluated value memory 106 is higher reliable than the evaluated valueDFD of the motion vector V, the values in the evaluated value memory 106and the shifted initial vector memory 107 are not rewritten.

In step S208, the allocation position calculating unit 201 determineswhether or not processing on all allocation blocks to which the motionvector V is to be allocated has finished. If, in step S208, it isdetermined that the processing on all the allocation blocks has notfinished, the process proceeds to step S203 and repeatedly performs thesubsequent steps. If, in step S208, the allocation position calculatingunit 201 has determined that the processing on all the allocation blockshas finished, the shifted initial vector allocating process ends.

In the first processing, a shifted initial vector for the selectedallocation block has not been stored in the shifted initial vectormemory 107 yet. Accordingly, when an evaluated value DFD of the shiftedinitial vector has not been stored in a corresponding allocation blockin the evaluated value memory 106, in step S201, no evaluated value DFDis acquired from the selected allocation block. Thus, the result of thedetermination in step S205 is affirmative, thus executing steps S206 andS207.

As described above, in the case of detecting the motion vector of ablock of interest, based on the fact that the amount of movement of amoving object has a certain level of continuity between sequentialframes and the amount of movement slightly changes, by using, as aninitial candidate vector, the shifted initial vector, which is a motionvector passing from a previous time (past) frame through a block ofinterest in a frame at the next time, that is, a motion vector which isidentical in magnitude and orientation to motion vector V and whoseinitial point is a block in the next frame which is identical inposition to a block at the terminal point of motion vector V detected inthe past frame, a more appropriate motion vector can be given as aninitial value for the gradient operation, compared with a case in which,as in the related art, only a motion vector previously obtained in aperipheral block is used as an initial candidate vector, in particular,in a boundary of a moving object. This enables an increase in accuracyof motion vector detection by the gradient operation.

In the case of fining the shifted initial vector, a block detected in aframe at the previous time, which passes in a frame at the next time,that is, a block in frame t which is identical in position to a block atthe terminal point of the motion vector V detected in frame t−1, isfound, and a motion vector in the obtained block is allocated as ashifted initial vector in a block of interest in the frame at the nexttime. Thus, the number of operations required for processing is reducedcompared with the case of searching for a motion vector that passesthrough a block of interest from all motion vectors in all blocks in aframe at a previous time. Accordingly, the establishment of hardware,whose realization has been difficult due to a huge number of operations,is realized.

Next, details of the configuration of the evaluated value comparing unit202 are described below.

FIG. 21 is a block diagram showing the configuration of the initialvector selecting unit 101. In the initial vector selecting unit 101,whose configuration is shown in FIG. 21, from among candidate vectors(hereinafter also referred to as “initial candidate vectors”) such asthe motion vector detected in the previous (past) frame and the shiftedinitial vectors, a highly reliable motion vector is selected as aninitial vector. Frame t at time t and frame t+1 at time t+1 are input tothe initial vector selecting unit 101.

When receiving the input frame t, the candidate vector positionoperation unit 251 selects a block of interest which is to be processedin frame t, finds, from a peripheral region of the block of interest,the position of a candidate block from which initial candidate vectorsfor the block of interest are to be acquired, the types and prioritylevels of motion vectors to be used as the initial candidate vectors,and supplies a detected vector acquiring unit 252 and a shifted initialvector acquiring unit 253 with positional information of the candidateblock and type information of the initial candidate vectors in the orderof the obtained priority values. In addition, the candidate vectorposition operation unit 251 supplies the positional information thecandidate block also to an offset position operation unit 254.

In the signal processing apparatus 1, the number of initial candidatevectors is set to a predetermined number based on balance betweeninitial vector accuracy and hardware performance. In addition, theposition of the candidate block, and the types and priority levels ofinitial candidate vectors are set beforehand as described with referenceto FIG. 23. The types of initial candidate vectors include shiftedinitial vector SV that is a motion vector obtained by shifting a motionvector that passes through a predetermined block to the predeterminedblock, that is, a motion vector which is identical in magnitude andorientation to the motion vector V and whose initial point is a block inthe next frame which is identical in position to a block at the terminalpoint of a motion vector detected in the past frame, a motion vector(hereinafter referred to as a “past vector PV”) detected in the pastframe, a motion vector (hereinafter also referred to as the “currentvector CV”) detected in a block anterior to a block of interest in thecurrent frame, a zero vector.

Therefore, when the type information of initial candidate vectors setbeforehand represents the past vector or the present vector, thecandidate vector position operation unit 251 supplies the positionalinformation of the candidate block and the type information of initialcandidate vectors to the detected vector acquiring unit 252. When thetype information of initial candidate vectors set beforehand representsthe shifted initial vector, the candidate vector position operation unit251 supplies the positional information of the candidate block and thetype information of initial candidate vectors to the shifted initialvector acquiring unit 253. In another case, for example, when the typeinformation of initial candidate vectors set beforehand represents azero vector, the candidate vector position operation unit 251 sets azero vector and supplies the zero vector to the offset positionoperation unit 254 together with the positional information of thecandidate block.

The detected vector acquiring unit 252 acquires, from the detectedvector memory 53, motion vectors in accordance with the positionalinformation of the candidate block and the type information of initialcandidate vectors which are supplied from the candidate vector positionoperation unit 251. The detected vector acquiring unit 252 outputs theacquired motion vectors as initial candidate vectors to the offsetposition operation unit 254.

In accordance with the positional information of the candidate block andthe type information of initial candidate vectors which are suppliedfrom the candidate vector position operation unit 251, the shiftedinitial vector acquiring unit 253 acquires a shifted initial vectorcorresponding to the positional information of the candidate block fromthe shifted initial vector memory 107, and outputs the acquired shiftedinitial vector as an initial candidate vector to the offset positionoperation unit 254. In addition, when no shifted initial vector isallocated at the block position designated by the candidate vectorposition operation unit 251, the shifted initial vector acquiring unit253 outputs a zero vector to the offset position operation unit 254.When no shifted initial vector is allocated, the zero vector may bestored in the shifted initial vector memory 107 beforehand.

When the initial candidate vector (or the zero vector from the candidatevector position operation unit 251) is input from the detected vectoracquiring unit 252 or the shifted initial vector acquiring unit 253, theoffset position operation unit 254 performs arithmetic operation, basedon the positional information of the candidate block supplied from thecandidate vector position operation unit 251, to find the block positionof an offset block obtained such that, for each initial candidatevector, the block of interest in frame t is offset (motion-compensated)so as to be in frame t+1. The offset position operation unit 254 outputsthe positional information of the candidate block and information of theoffset block position to an evaluated value operation unit 255 togetherwith the initial candidate vector.

When receiving the positional information of the candidate block andinformation of the offset block position as well as the initialcandidate vector, the evaluated value operation unit 255 finds anevaluated value DFD of the initial candidate vector by using frame t andframe t+1. The evaluated value operation unit 255 outputs the obtainedevaluated value DFD to the evaluated value comparing unit 256 togetherwith the initial candidate vector.

The evaluated value comparing unit 256 compares the evaluated value DFDinput by the evaluated value operation unit 255 and an evaluated valueDFD of an optimal candidate vector stored in an optimal candidate vectorstoring register 257. When the evaluated value comparing unit 256determines that the evaluated value DFD of the initial candidate vectoris less than the evaluated value DFD of the optimal candidate vector,that is, the initial candidate vector is higher reliable than theoptimal candidate vector, the evaluated value comparing unit 256replaces the optimal candidate vector and its evaluated value DFD by theinitial candidate vector and its evaluated value DFD, which aredetermined to be higher reliable. Finally, the evaluated value comparingunit 256 controls the optimal candidate vector storing register 257 tooutput the optimal candidate vector, which has been determined to bemost reliable from among all the candidate vectors, as the initialvector V0, to the recursive gradient operation unit 103.

The optimal candidate vector storing register 257 stores the initialcandidate vector, which has been determined by the evaluated valuecomparing unit 256 to have a small evaluated value DFD (highlyreliable), as the optimal candidate vector, together with its evaluatedvalue DFD. Under the control of the evaluated value comparing unit 256,the optimal candidate vector storing register 257 outputs the finallystored optimal candidate vector as the initial vector V0 to therecursive gradient operation unit 103.

FIG. 22 shows a peripheral region that can be used as a candidate blockfor an initial vector. In the example shown in FIG. 22, the arrow Tindicates a direction of lapse of time from past (previous) frame t−1 attime t−1, which is positioned on the left side of the foreground in FIG.22, to the current frame t at time t, which is positioned on the rightside of the background. In the example shown in FIG. 22, the peripheralregion that can be used for the initial candidate vector is formed byseven by seven blocks around block Bt of interest, and each blockconsists of four by pixels.

The motion vector detecting process is executed in raster scanning orderfrom the top left block of the frame. Accordingly, in motion vectordetection on the block Bt of interest in the current frame t, in theinitial vector selecting unit 101, the results of detecting motionvectors up to the last block can be used as initial candidate vectors.

In other words, the peripheral region around the block Bt of interestconsists of block CVB that is processed before the block Bt of interestis processed, and block PVB that is processed after block Bt of interestis processed. Therefore, when an initial vector for block Bt of interestis found, an initial candidate vector can be selected from among amotion vector (the current vector CV) detected in the current frame t inblock CVB, and a motion vector (past vector) detected in the past framet−1 in block PVB. In this case, also a shifted initial vector that isallocated to a block in the same peripheral region can be used as aninitial candidate vector.

FIG. 23 shows examples of candidate blocks for the initial vector set inthe candidate vector position operation unit 251. In the example shownin FIG. 23, in the peripheral region around the block Bt of interest,eight predetermined blocks bearing alphanumeric symbols are set ascandidate blocks from which initial candidate vectors are acquired. Ineach of the eight predetermined blocks, the symbols with the slash marktherebetween represent a “initial candidate vector type” and “priority”,respectively. Among initial candidate vector types, the letter Prepresents a past vector PV detected in the past frame t−1, the letter Crepresents the present vector detected in the current frame t, and theletter S represents shifted initial vector SV.

The representation “S/1” of the block Bt of interest indicates that theshifted initial vector SV allocated to the block Bt of interest is usedas an initial candidate vector with “first” priority. The representation“C/2” of a block left adjacent to the block Bt of interest indicatesthat the current vector CV of the block detected in the current frame tis used as an initial candidate vector with “second” priority. Therepresentation “C/3” of an upper right block from the block Bt ofinterest indicates that the current vector CV of the block detected inthe current frame t is used as an initial candidate vector with “third”priority. The representation “P/4” of a lower right block from the blockBt of interest indicates that the past vector PV of the block detectedin the past frame t−1 is used as an initial candidate vector with“fourth” priority.

The representation “C/6” of a lower right block from the top left cornerof the peripheral region of seven by seven pixels indicates that thecurrent vector CV of the block detected in the current frame t is usedas an initial candidate vector with sixth priority. The representation“C/5” of a lower left block from the top right corner of the peripheralregion of seven by seven pixels indicates that the current vector CV ofthe block detected in the current frame t is used as an initialcandidate vector with fifth priority. The representation “P/7” of anupper right block from the bottom left corner of the peripheral regionof seven by seven pixels indicates that the past vector PV of the blockdetected in the past frame t−1 is used an initial candidate vector withseventh priority. The representation “P/8” of an upper left block fromthe bottom right corner of the peripheral region of seven by sevenpixels indicates that the past vector PV of the block detected in thepast frame t−1 is used as an initial candidate vector with eighthpriority.

As described above, in the example shown in FIG. 23, among the block Btof interest and blocks adjacent thereto, the vectors of the block Bt ofinterest, and left adjacent, upper right, and lower right blocks fromthe block Bt of interest are used as initial candidate vectors. Amongblocks that are not adjacent to the block Bt of interest, the vectors ofblocks at positions internally shifted by one block from the corners ofthe peripheral region of seven by seven pixels are selected.

In other words, in the example shown in FIG. 23, priority is set so thata block adjacent to (spatially and temporally close to) the block Bt ofinterest has higher priority than that of a block at some distance andthat the current vector detected in current frame t has higher prioritythan that of the past vector detected in past frame t−1. The positions,types, and priority of the above initial candidate vectors are set basedon spatial correlation, temporal correlation, etc., including not onlyblocks in the vicinity of the block Bt of interest but also blocks atsome distance, in order that probable initial candidate vectors may beobtained from the least number of candidate vectors. Accordingly, insuch a manner, by using the motion vectors of predetermined blocks setbeforehand as initial candidate vectors, a huge number of arithmeticoperations due to an increase in the number of initial candidate vectorscan be reduced.

The types and positions of candidate blocks are not limited to theexample in FIG. 23. Other types of blocks and other positions of blocksmay be used. In addition, when considering a case in which no optimalvector exists, a zero vector that suppresses deterioration in such acase may be used. Also the number of candidate blocks may be either moreor less than eight.

Next, details of the initial vector selecting process are describedbelow with reference to the flowchart shown in FIG. 24.

In step S251, the candidate vector position operation unit 251 finds,from a peripheral region around a selected block of interest, theposition of a candidate block from which an initial candidate vector isto be acquired, and the type and priority of the initial candidatevector, the position, type, and priority being set beforehand. In stepS252, the candidate vector position operation unit 251 determines whichof a past vector and a current vector the type of the initial candidatevector in the candidate block is. If, in step S252, the candidate vectorposition operation unit 251 has determined that the type of the initialcandidate vector in the candidate block is one of the past and currentvectors, the process proceeds to step S253. In step S253, the candidatevector position operation unit 251 supplies the detected vectoracquiring unit 252 with positional information of the candidate blockand type information of the initial candidate vector. Under the controlof the candidate vector position operation unit 251, the detected vectoracquiring unit 252 acquires, from the detected vector memory 53, amotion vector (the past vector PV or the current vector CV) inaccordance with the positional information of the candidate block andthe type information of the initial candidate vector, and outputs theacquired motion vector to the offset position operation unit 254. Theprocess proceeds to step S257.

If, in step S252, the candidate vector position operation unit 251 hasdetermined that the type of the initial candidate vector in thecandidate block is not one of the past and current vectors, the processproceeds to step S254. In step S254, the candidate vector positionoperation unit 251 determines whether the type of the initial candidatevector in the candidate block is a shifted initial vector. If, in stepS254, the candidate vector position operation unit 251 has determinedthat the type of the initial candidate vector in the candidate block isa shifted initial vector, the process proceeds to step S255. In stepS255, the candidate vector position operation unit 251 supplies theshifted initial vector acquiring unit 253 with the positionalinformation of the candidate block and the type information of theinitial candidate vector. In addition, under the control of thecandidate vector position operation unit 251, the shifted initial vectoracquiring unit 253 acquires, from the shifted initial vector memory 107,a shifted initial vector corresponding to the positional information ofthe candidate block, and outputs the acquired shifted initial vector tothe offset position operation unit 254. The process proceeds to stepS257.

If, in step S254, the candidate vector position operation unit 251 hasdetermined that the type of the initial candidate vector in thecandidate block is not a shifted initial vector, that is, it isdetermined that the type of the initial candidate vector in thecandidate block is a zero vector, the process proceeds to step S256. thecandidate vector position operation unit 251 sets a zero vector as theinitial candidate vector, and supplies the offset position operationunit 254 with the positional information of the candidate vectortogether with the zero vector. The process proceeds to step S257. Alsoin steps S253 and S255, the candidate vector position operation unit 251supplies the positional information of the candidate block to the offsetposition operation unit 254.

In step S257, when receiving the initial candidate vector input y thedetected vector acquiring unit 252 or the shifted initial vectoracquiring unit 253, based on the positional information of the candidateblock supplied by the candidate vector position operation unit 251, theoffset position operation unit 254 performs arithmetic operation to findthe block position of an offset block obtained by offsetting the blockof interest in frame t on frame t+1. The offset position operation unit254 outputs the positional information of the candidate block andpositional information of the offset block as well as the initialcandidate vector to the evaluated value operation unit 255, and theprocess proceeds to step S258.

When the evaluated value operation unit 255 receives the positionalinformation of the candidate block and the positional information of theoffset block from the offset position operation unit 254 together withthe initial candidate vector, in step S258, the evaluated valueoperation unit 255 finds an evaluated value DFD of the initial candidatevector by using frame t and frame t+1, and outputs the obtainedevaluated value DFD to the evaluated value comparing unit 256 togetherwith the initial candidate vector. The process proceeds to step S259.

In step S259, the evaluated value comparing unit 256 determines whetherthe evaluated value DFD obtained by the evaluated value operation unit255 is less than the evaluated value DFD of the optimal candidate vectorstored in the optimal candidate vector storing register 257. If theevaluated value comparing unit 256 has determined that the evaluatedvalue DFD obtained by the evaluated value operation unit 255 is lessthan the evaluated value DFD of the optimal candidate vector stored inthe optimal candidate vector storing register 257, that is, that theinitial candidate vector is higher reliable than the optimal candidatevector, In step S260, the evaluated value comparing unit 256 rewritesthe optimal candidate vector and its evaluated value DFD in the optimalcandidate vector storing register 257 by the initial candidate vectordetermined to be higher reliable and its evaluated value DFD. Theprocess proceeds to step S261.

If, in step S259, the evaluated value comparing unit 256 has determinedthat the evaluated value DFD obtained by the evaluated value operationunit 255 is less than the evaluated value DFD of the optimal candidatevector stored in the optimal candidate vector storing register 257, stepS260 is skipped over and the process proceeds to step S261.

In step S261, the candidate vector position operation unit 251determines whether processing on all initial candidate vectors (eightvectors in the example shown in FIG. 23) has finished. If the candidatevector position operation unit 251 has determined that the processing onall the initial candidate vectors has not finished, the process returnsto step S252 and repeatedly performs the subsequent steps.

If, in step S261, the candidate vector position operation unit 251 hasdetermined that the processing on all the initial candidate vectors hasfinished, the process proceeds to step S262. The evaluated valuecomparing unit 256 controls the optimal candidate vector storingregister 257 to output, to the recursive gradient operation unit 103,the all the initial candidate vectors, the optimal candidate vector,among the all the initial candidate vectors, determined to have thehighest reliability, as the initial vector V0. The initial vectorselecting process ends.

As described above, after, in a block of interest, evaluated values DFDof plural initial candidate vectors are found, an initial candidatevector, which has the least evaluated value DFD, that is, the highestreliability, can be selected as an initial vector. Thus, the optimalinitial vector for motion vector detection in the subsequent stage canbe given. This results in an increase in accuracy of motion vectordetection in the subsequent stage. In step, by using the motion vectorsof predetermined blocks set beforehand as initial candidate vectors, ahuge number of arithmetic operations due to an increase in the number ofinitial candidate vectors can be reduced.

Based on the fact that the amount of movement of a moving object has acertain level of continuity between sequential frames and the amount ofmovement slightly changes, a shifted initial vector that is a motionvector passing from a previous frame through a block of interest is usedas an initial candidate vector. Thus, as in the related art, higheraccurate motion detection can be performed compared with the case ofusing only past motion vectors obtained in peripheral blocks as initialcandidate vectors. This is particularly effective in a boundary of amoving object.

Next, details of the configuration of the recursive gradient operationunit 103 are described below.

FIG. 25 is a block diagram showing the configuration of the recursivegradient operation unit 103. The recursive gradient operation unit 103performs an optimal motion vector detecting process by using frame t attime t and frame t+1 at time t+1, which are input. This motion vectordetecting process is executed for each predetermined block consisting ofa plurality of pixels. In each block, the recursive gradient operationunit 103 outputs the optimal motion vector, which is highly reliable,based on an evaluated value DFD by repeatedly executing the gradientoperation in units of blocks or in units of pixels.

Frame t at time t and frame t+1 at time t+1 are input to the recursivegradient operation unit 103 through the prefilters 102-1 and 102-2, andthe initial vector V0 is input from the initial vector selecting unit101 to the recursive gradient operation unit 103.

Under the control of the effective pixel determining unit 403, for eachpredetermined block, the mode selecting unit 401 selects a processingmode for the gradient operation, and outputs the initial vector V0 fromthe initial vector selecting unit 101 to a selector 402 and the vectorevaluating unit 104. Processing modes for the gradient operation consistof a block-unit processing mode that uses a block as one from which amotion vector is detected, and a pixel-unit processing mode that uses apixel as one from which a motion vector is detected. The block-unitprocessing mode is selected as an initial value. Under the control ofthe vector evaluating unit 104, the selector 402 outputs one of theinitial vector V0 from the mode selecting unit 401 and the motion vectorVn output from the gradient operation unit 404, as a motion vector(hereinafter referred to as an “offset vector”) used as an initial valuefor the gradient operation, to the effective pixel determining unit 403and the gradient operation unit 404.

When receiving the offset vector selected by the selector 402, by usingframe t at time and frame t+1 at time t+1 which are respectively inputthrough the prefilters 102-2 and 102-1, while using, as a start point, aposition calculated by offsetting the offset vector, the effective pixeldetermining unit 403 determines whether, in an operation block in eitherunit processing mode, the number of effective pixels in the gradientoperation is greater than a threshold value. The effective pixeldetermining unit 403 switches between processing methods depending onthe result of determination. In other words, if the effective pixeldetermining unit 403 has determined that the number of effective pixelsin the gradient operation is equal to or less than the threshold value,the effective pixel determining unit 403 controls the mode selectingunit 401 to change the processing mode or the predetermined block to thepixel-unit processing mode and to stop the gradient operation. If theeffective pixel determining unit 403 has determined that the number ofeffective pixels in the gradient operation is greater than the thresholdvalue, the effective pixel determining unit 403 controls the gradientoperation unit 404 to execute the gradient operation in eitherprocessing unit.

When receiving the offset vector input from the selector 402, by usingframe t at time t and frame t+1 at time t+1 which respectively inputthrough the prefilters 102-2 and 102-1, while using, as a start point, aposition calculated by offsetting the offset vector from the selector402, the gradient operation unit 404 executes the gradient operation ineither unit processing mode, and outputs calculated motion vector Vn tothe delay unit 405 and the vector evaluating unit 104.

The delay unit 405 stores the motion vector Vn output from the gradientoperation unit 404 until the next processing cycle of the effectivepixel determining unit 403 and the gradient operation unit 404, andoutputs the stored motion vector Vn to the effective pixel determiningunit 403 in response to the control of the selector 402.

FIG. 26 is a detailed block diagram showing the configuration of theeffective pixel determining unit 403. In the example shown in FIG. 26,the effective pixel determining unit 403 includes a temporal pixeldifference calculating unit 411, a pixel difference determining unit412, an effective pixel counter 413, and a gradient operationcontinuation determining unit 414.

When receiving the offset vector selected by the selector 402, thetemporal pixel difference calculating unit 411 selects a pixel in ablock-unit operation block, calculates time-base pixel difference Δt ofthe selected pixel by using the offset vector, and frame t at time t andframe t+1 at time t+1 which are respectively input through theprefilters 102-2 and 102-1, and outputs the calculated time-base pixeldifference Δt to the pixel difference determining unit 412.

The pixel difference determining unit 412 determines whether thetime-base pixel difference Δt calculated by the temporal pixeldifference calculating unit 411 is less than a predetermined thresholdvalue (hereinafter referred to as a “pixel difference”). If the pixeldifference determining unit 412 has determined that the time-base pixeldifference Δt is less than the predetermined pixel difference, the pixeldifference determining unit 412 increments the number of effectivepixels of the effective pixel counter 413 by one. The effective pixelcounter 413 counts the number of pixels which are determined aseffective pixels in each operation block by the pixel differencedetermining unit 412. The effective pixel counter 413 is reset in eachoperation block.

The gradient operation continuation determining unit 414 determineswhether, in the operation block in either unit processing mode, thenumber of effective pixels for the gradient operation is less than athreshold value. If the gradient operation continuation determining unit414 has determined that, in the operation block in either unitprocessing mode, the number of effective pixels for the gradientoperation is greater than the threshold value, the gradient operationcontinuation determining unit 414 outputs a flag (flg=1) that allows thegradient operation unit 404 to execute the gradient operation in eitherunit processing mode. If the gradient operation continuation determiningunit 414 has determined that, in the operation block in either unitprocessing mode, the number of effective pixels for the gradientoperation is less than the threshold value, the gradient operationcontinuation determining unit 414 controls the mode selecting unit 401to select the other unit processing mode and to output, to the gradientoperation unit 404, a flag (flg=0) that aborts the gradient operation.

FIG. 27 is a detailed block diagram showing the configuration of thegradient operation unit 404. In the example shown in FIG. 27, thegradient operation unit 404 includes a temporal pixel differencecalculating unit 421, a pixel difference determining unit 422, ahorizontal-and-vertical pixel difference calculating unit 423, agradient accumulation unit 424, and a vector calculating unit 425.

The temporal pixel difference calculating unit 421 controls portions ofthe gradient operation unit 404 based on the flag input from theeffective pixel determining unit 403. In other words, when the flagindicates one (flg=1), the temporal pixel difference calculating unit421 allows the portions of the gradient operation unit 404 to executethe gradient operation. Specifically, when receiving the flag from theeffective pixel determining unit 403, by using frame t at time t andframe t+1 at time t+1 which are respectively input through theprefilters 102-2 and 102-1, the temporal pixel difference calculatingunit 421 selects pixels in the operation block in either unit processingmode around the pixel calculated by offsetting the offset vector fromthe selector 402, calculates the a time-base pixel difference Δt of theselected pixels, and outputs the calculated time-base pixel differenceΔt and the offset vector to the pixel difference determining unit 422.In addition, when processing on the pixels in the operation blockfinishes, the temporal pixel difference calculating unit 421 outputs theoffset vector to the vector calculating unit 425, and controls thevector calculating unit 425 to calculate a motion vector in a blockwhich is subject to detection.

Alternatively, when the flag indicates zero (flg=0), the temporal pixeldifference calculating unit 421 does not calculate the time-base pixeldifference Δt of the pixels in the operation block. Each portion of thegradient operation unit 404 does not execute the gradient operation toabort processing. At this time, the temporal pixel differencecalculating unit 421 controls the vector calculating unit 425 to set themotion vector V as a zero vector.

The pixel difference determining unit 422 determines whether thetime-base pixel difference Δt calculated by the temporal pixeldifference calculating unit 421 is less than a predetermined thresholdvalue (hereinafter referred to as a “pixel difference”). If the pixeldifference determining unit 422 has determined that the time-base pixeldifference Δt calculated by the temporal pixel difference calculatingunit 421 is less than the predetermined threshold value, the pixeldifference determining unit 422 uses the pixels as what is subject tothe gradient operation, and outputs the time-base pixel difference Δtand the offset vector to the horizontal-and-vertical pixel differencecalculating unit 423. In other words, the pixels having the pixeldifference Δt, which has been determined to be less than thepredetermined pixel difference, are subject to arithmetic operation inthe horizontal-and-vertical pixel difference calculating unit 423 andthe gradient accumulation unit 424. In addition, if the pixel differencedetermining unit 422 has determined that the time-base pixel differenceΔt is not less than the predetermined pixel difference, the pixeldifference determining unit 422 allows the horizontal-and-vertical pixeldifference calculating unit 423 and the gradient accumulation unit 424to inhibit the pixel processing.

When receiving the offset vector from the pixel difference determiningunit 422, by using frame t at time t and frame t+1 at time t+1 which arerespectively input through the prefilters 102-2 and 102-1, thehorizontal-and-vertical pixel difference calculating unit 423 calculateshorizontal pixel difference Δx and vertical pixel difference Δy of thepixels, whose time-base pixel difference Δt has been determined to beless than the predetermined pixel difference in the operation block ineither unit processing mode around the pixel calculated by offsettingthe offset vector. In addition, the horizontal-and-vertical pixeldifference calculating unit 423 outputs time-base pixel difference Δt,horizontal pixel difference Δx, and vertical pixel difference Δy to thegradient accumulation unit 424. The gradient accumulation unit 424accumulates the gradient of the pixels, whose time-base pixel differenceΔt has been determined to has a value less than the predetermined pixeldifference. In other words, the gradient accumulation unit 424accumulates the time-base pixel difference Δt calculated by the temporalpixel difference calculating unit 421, the horizontal pixel differenceΔx and vertical pixel difference Δy calculated by thehorizontal-and-vertical pixel difference calculating unit 423, andoutputs the accumulated gradient to the vector calculating unit 425.

When receiving the offset vector from the temporal pixel differencecalculating unit 421, the vector calculating unit 425 calculates thegradient accumulated by the gradient accumulation unit 424, andcalculates motion vector vn by using the least square addition. Inaddition, the vector calculating unit 425 finds motion vector Vn byadding the offset vector from the temporal pixel difference calculatingunit 421 to the calculated motion vector vn, and outputs the obtainedmotion vector Vn to the vector evaluating unit 104 and the delay unit405.

Next, a block from which a motion vector is to be detected and anoperation block for motion vector are described below.

When considering movement of objects in an image, in many cases, ingeneral, the objects move identically if the objects are identical.Therefore, regarding units of a detecting process for detecting a motionvector, as shown in FIG. 28, it is common that the process is performedin units of blocks.

In the example shown in FIG. 28, the arrow X indicates a horizontaldirection, and the arrow Y indicates a vertical direction. The arrow Talso indicates a direction of lapse of time from frame t at time t,which is positioned on the right side of the foreground, to frame t+1 attime t+1, which are positioned on the left side of the background.

In the example in FIG. 28, a block (hereinafter referred to as a“8-by-8-pixel block”) composed of eight by eight pixels is shown asdetection block K in each frame which is subject to detection. Thedetection block K represents a block in which, when motion vectordetection on an 8-by-8-pixel block is performed, identical movement isfound for the 8-by-8-pixel block.

In addition, the motion vector detection (or operation) by the gradientmethod has a feature capable of detecting a motion vector for eachpixel. However, in the case of performing motion vector operation inunits of pixels, a gradient method that uses a statistical solution ofthe least square method has a defect in that detection accuracyconsiderably decreases. Therefore, ordinarily, not only for each blockbut also for each pixel for processing, when motion vector operation isperformed, it is common that pixels for use in the gradient operationare configured in units of blocks (operation blocks).

As described above, the pixels for use in the gradient operation arepixels in an 8-by-8 operation block. In other words, in the example inFIG. 28, it may be said that a motion vector, obtained by using theoperation block (8 by 8 pixels) to perform the gradient operation,corresponds to all the pixels in the detection block K (8 by 8 pixels).

However, regarding one problem that occurs when, as described above,pixels for use in the gradient operation are treated in units ofoperation blocks, as shown in FIG. 29, there is a case in which pixelsconstituting detection block K include pixels of an object having adifferent movement.

In the example shown in FIG. 29, in detection block K (or an operationblock), which consists of eight by eight pixels (64 pixels), 28 pixels(indicated by the thick circles) with the top left end pixel as areference have the slanting left upward movement indicated by the arrowA. In the detection block K consisting of eight by eight pixels, 36pixels with the bottom right end pixel have the horizontal rightmovement indicated by the arrow B.

Accordingly, in the detection block K, the above assumption that pixelshave identical movements does not hold. In the case of performing thegradient operation by using an operation block including pixels having adifferent movement, motion vector detection accuracy decreases. In otherwords, this is a problem of detection accuracy decrease concerning anobject annihilation region (covered background region) and an objectgeneration region (uncovered background region) that are generated on aboundary between objects having different movements. The annihilationregion is a mixed region for a foreground region that is positioned tocorrespond to the anterior end of a traveling direction of an object inthe foreground, and represents a region whose background componentbecomes covered by the foreground in accordance with lapse of time.Conversely, the generation region is a mixed region for the foregroundregion that is positioned to correspond to the posterior end of thetraveling direction of the object in the foreground, and represents aregion whose background component becomes uncovered in accordance withlapse of time.

FIG. 30 is an illustration of the luminance state of a detection blockhaving identical objects. On the left side of FIG. 30, the arrow Xindicates a horizontal direction, and the arrow Y indicates a verticaldirection. The arrow T indicates a direction of lapse of time from framet at time t, which is positioned on the right side of the background ofFIG. 30, to frame t+1 at time t+1, which is positioned on the left sideof the foreground of FIG. 30. On the right side of FIG. 30, the arrow Xindicates a horizontal direction, and the arrow L indicates a luminance.In other words, the luminances Lp1, Lp2, Lp3, . . . , Lpi (3<i<7), . . ., Lp7, on the right side of FIG. 30, represent, in the 8-by-8-pixeldetection block in frame t, on the left side of FIG. 30, the luminancesof pixels p1, p2, p3, . . . , pi (3<i<7), . . . , p7, . . . in the lowerfifth row from the top. Similarly, the luminances Lq1, Lq2, Lq3, . . . ,Lqi (3<i<7), . . . , Lq7 represent, in the 8-by-8-pixel detection blockin frame t+1 on the left side of FIG. 30, the luminances of pixels q1,q2, q3, . . . , qi (3<i<7), q7, . . . , in the lower fifth row from thetop, which are in phase with pixels p1, p2, p3, . . . , pi (3<i<7), . .. , p7, etc. In addition, the arrow between luminances Lp1 to Lp7 andluminances Lq1 to Lq7 indicates each time-base pixel difference Δtbetween each pixel in frame t and each pixel in frame t+1.

Accordingly, in the example shown in FIG. 30, the time-base pixeldifference Δt between pixels p1 and q1 is represented by the differencebetween luminances Lp1 and Lq1. The time-base pixel difference Δtbetween pixels p2 and q2 is represented by the difference betweenluminances Lp2 and Lq2. The time-base pixel difference Δt between pixelsp3 and q3 is represented by the difference between luminances Lp3 andLq3. The time-base pixel difference Δt between pixels pi and qi isrepresented by the difference between luminances Lpi and Lqi. Thetime-base pixel difference Δt between pixels p7 and q7 is represented bythe difference between luminances Lp7 and Lq7. Differences in luminanceslightly change in such a form that the curve connecting luminances Lp1to Lp7, and the curve connecting luminances Lq1 to Lq7 havesubstantially identical shapes.

As described above, when pixels in a detection block are identicalobjects (or are identical in movement), the luminances of correspondingtemporal pixels do not considerably change.

FIG. 31 is an illustration of a luminance state in a detection block ina case in which the pixels of objects having different movements existat the same time. In FIG. 30, portions corresponding to those in FIG. 31are denoted by corresponding reference numerals. Accordingly, adescription of the portions is omitted. In the example shown in FIG. 31,pixel p7 in frame t differs in movement from other pixels.

For example, when pixel p7 in frame t is identical in movement to theother pixels, in frame t+1, the luminance of q7 positioned in phase withpixel p7 must be represented by luminance Lq7-1. However, since, in theexample shown in FIG. 31, pixel p7 differs in movement from the otherpixels, as is indicated by luminance Lq7-2, the luminance of pixel q7considerably changes downward from luminance Lq701. Therefore, thetime-base pixel difference Δt between pixels p7 and q7, that is, thedifference between luminances Lp7 and Lq7-2, greatly changes.

As described above, for example, when, in a detection block, the aboveobject annihilation, generation, transformation, or the like, causes astate in which pixels of object having different movements exist at thesame time, there are many cases in which the luminances of correspondingpixels considerably change, and this may causes a possibility ofirregularity in movement. Accordingly, the effective pixel determiningunit 403 is configured to determine that pixels having a small luminancechange are effective when being used in motion vector detection, and,conversely to determine that pixels having a large luminance change arenot effective when being used in motion vector detection. In otherwords, by noting an element of the magnitude of luminance change, anddetermining whether a pixel is effective based on the magnitude ofchange in the luminance of the pixel, a pixel whose luminance slightlychanges can be used for motion vector detection, and conversely, a pixelwhose luminance considerably changes cannot be used for motion vectordetection. This enables increased accuracy of motion vector detection.

Specifically, for each pixel in the operation block, the effective pixeldetermining unit 403 sets a predetermined pixel difference (thresholdvalue) on the time-base pixel difference Δt. When the time-base pixeldifference Δt is less than the set predetermined pixel difference, it isdetermined that the pixel contributes to (are effective in) motionvector detection, and uses the pixel in the gradient method in the caseof performing motion vector detection. When the time-base pixeldifference Δt is not less than the set predetermined pixel difference,it is determined that the pixel is regarded as having a possibility togenerate irregularity in movement, and the pixel is excluded from thegradient operation in the case of performing motion vector detection.This prevents a different movement from being included, so that morestable gradient operation is executed. As a result, a probable motionvector is detected.

However, since, as described above, the gradient operation is arithmeticoperation based on the least squares method, which is a statisticalsolution, by dividing pixels into pixels for used in the gradientoperation and those that are not used in the gradient operation, thepixels for used in the gradient operation extremely decrease. If such anextremely less number of pixels is used to perform the gradientoperation, the reliability of operation decreases, thus causing apossibility of a decrease in the accuracy of motion vector detection.

Accordingly, when the number of pixels for use in the gradient operationis small, the effective pixel determining unit 403 regards the gradientoperation in the processing unit of the (8-by-8-pixel) detection blockas unstable, and performs processing by switching to an operation unitfor each of (64) pixels in the 8-by-8-pixel block, as shown in FIG. 32.

FIG. 32 is an illustration of an example of an operation block in thepixel-unit processing. The example shown in FIG. 32 shows, when(8-by-8-pixel) detection block K in frame is switched to the pixel-unitprocessing, operation block E (consisting of 9 by 9 pixels in FIG. 32)for pixel p positioned at the top left end of detection block K.

In other words, when finding the motion vector of pixel p, operationblock E (consisting of 9 by 9 pixels in FIG. 32) around pixel p is used.For example, when finding the motion vector of a right adjacent pixelwhich is right adjacent to pixel p, a 9-by-9-pixel operation block (notshown) around the right adjacent pixel with respect to pixel p is used.

Therefore, for example, even if, in detection block K, most pixels movesdifferently from pixel p, in detection block K (8 by 8 pixels), thenumber of pixels for use in the gradient operation is counted, and, ifthe counted number is small, the processing is switched to thepixel-unit processing. As shown in FIG. 32, operation block E in thepixel-unit processing, the gradient operation is executed.

When, as described above, by dividing pixels into pixels for used in thegradient operation and those that are not used in the gradientoperation, the pixels for used in the gradient operation extremelydecrease, not by stopping detection of the motion vectors of all thepixels in detection block K (8 by 8 pixels), but by switching to thepixel-unit processing and performing the gradient operation in a form inwhich a pixel in operation block E (9 by 9 pixels) is changed for eachpixel, inclusion of pixels that are not used in the gradient operationcan be prevented as much as possible, and more accurate motion vectordetection can be performed depending on pixels.

FIG. 33 is an illustration of an example of application of thepixel-unit processing to pixels in the detection block K (operationblock) shown in FIG. 29. In the example shown in FIG. 33, pixel-unitprocessing is performed in the detection block K (8 by 8 pixels), whichconsists of pixels having two different movements, that is, the pixels(the thick circles) having the slanting upward left movement indicatedby the arrow A, and the pixels (the thin circles) having the horizontalright movement indicated by the arrow B. In this case, when detectingthe motion vector of the top left end detection pixel p in detectionblock K, which is subject to detection, operation block E (9-by-9-pixelblock) around detection pixel p is used.

The pixels in operation block E have the slating upward left movementindicated by the arrow A excluding three pixels (thin circles) in thebottom right corner which have the horizontal right movement indicatedby the arrow B. Similarly to the case of the block-unit processing, foreach pixel in operation block E, a predetermined threshold value (pixeldifference) is set on time-base pixel difference Δt. When time-basepixel difference Δt is less than the set threshold value, it isdetermined that the pixel contributes to motion vector detection, andthe pixel is used in the gradient operation in the case of performingmotion vector detection. When time-base pixel difference Δt is greaterthan the set threshold value, it is determined that the pixel has apossibility of generating irregularity in movement, and the pixel is notused in the gradient operation in the case of performing motion vectordetection.

In other words, in the example in FIG. 33, in operation block E, thepixels (thick circles) other than the three pixels (thin circles) in thebottom right corner are determined to be effective in the gradientoperation for detection pixel p. The effective pixels are used toexecute the gradient operation. Thus, compared with the gradientoperation in the block-unit processing, which is executed by using thedetection block K (8 by 8 pixels) shown in FIG. 29 as an operationblock, more stable gradient operation is executed, so that a probablemotion vector is detected.

In the operation block for each pixel, when, by dividing pixels intopixels for used in the gradient operation and those that are not used inthe gradient operation, the pixels for used in the gradient operationextremely decrease, it is determined that motion vector detection isdangerous, and the gradient operation is aborted. In other words, thisis because, if it is determined that a movement having some magnitude isdetected although motion vector detection is unstable, the detectedmotion vector may be improbable, that is, it may not match the movementof the object in the actual image. In many cases, an image generated byusing the improbable motion vector to execute the subsequent processing(e.g., a vector allocating process or vector compensating process) mayhave visual deterioration such as discontinuous movement and occurrenceof block noise.

Accordingly, when the pixels for used in the pixel-unit gradientoperation extremely decrease, for example, zero vectors (i.e.,stationary state) are used as the detected motion vectors. This preventsthe motion vector from affecting the subsequent processing, thussuppressing large visual deterioration in the generated image.

Next, details of the recursive gradient operation are described withreference to the flowchart shown in FIGS. 34A-34C. FIG. 34A shows therecursive gradient operation for operation in a block-unit, pixel-unit,and 0 vector processing mode with a block basis. This “with a blockbasis” means a block for a block-unit processing mode is NOT switched toa block for a pixel-unit processing mode for a pixel/pixels that is/arenot in a group of the effective pixels of the block for the block-unitprocessing mode in a case the number of the effective pixels of theblock for the block-unit processing mode is greater than a predeterminedthreshold value. FIG. 34B shows a recursive gradient operation in acombination of a block-unit and a 0 vector processing mode. FIG. 34Cshows a recursive gradient operation with a combination of theblock-unit, pixel-unit, and 0 vector processing modes with a pixelbasis. This “with a pixel basis” means a block for a block-unitprocessing mode is switched to a block for a pixel-unit processing modefor a pixel/pixels that is/are not in a group of the effective pixels ofthe block for block-unit processing mode in a case the number of theeffective pixels of the block for the block-unit processing mode isgreater than a predetermined threshold value. The operation in FIG. 34Ais described initially. The initial vector V0 is input from the previousstage to the mode selecting unit 401.

In step S401, the mode selecting unit 401 selects the block-unitprocessing mode. the mode selecting unit 401 uses a detection block(operation block) as a block in frame t as a detection block (operationblock), and outputs the initial vector V0 to the 402 and the vectorevaluating unit 104. The process proceeds to step S402. This allows eachportion of the recursive gradient operation unit 103 to execute theblock-unit processing. In step S402, in response to control by thevector evaluating unit 104, the selector 402 selects the initial vectorV0 input from the mode selecting unit 401 as an offset vector, andoutputs the selected offset vector to the temporal pixel differencecalculating unit 411 and the temporal pixel difference calculating unit421. The process proceeds to step S403.

In step S403, the temporal pixel difference calculating unit 411 and thepixel difference determining unit 412 use (offset the initial vector V0in this case) the selected offset vector to execute a block-uniteffective pixel determining process. The process proceeds to step S404.Details of the block-unit effective pixel determining process aredescribed with reference to FIG. 35. In the block-unit effective pixeldetermining process, the effective pixel counter 413 counts, in theblock-unit operation block, the number of pixels in which pixeldifferences are determined to be smaller than a predetermined pixeldifference, that is, to be effective in the gradient operation in thesubsequent stage.

In step S404, the gradient operation continuation determining unit 414determines whether the number of pixels (effective pixels) counted inthe effective pixel counter 413 is greater than predetermined thresholdvalue α. If it is determined that the number of effective pixels isgreater than predetermined threshold value α, the gradient operationcontinuation determining unit 414 outputs, in units of blocks, a flag(flg=1) for allowing the gradient operation unit 404 to execute thegradient operation. The process proceeds to step S405.

In step S405, based on the flag from the gradient operation continuationdetermining unit 414, the gradient operation unit 404 uses the offsetvector (the initial vector V0 in this case) from the selector 402 toexecute the block-unit gradient operation process. The process proceedsto step S406. Details of the gradient operation process are describedbelow with reference to FIG. 36. This gradient operation process findsmotion vector Vn, and the obtained motion vector Vn is output to thevector evaluating unit 104 and the delay unit 405. The motion vector Vnis the sum (Vn=Vn-1+vn) of the motion vector vn calculated in the firstgradient operation and the offset vector Vn−1. For example, motionvector V1 is the sum (V1=V0+v1) of the motion vector v1 calculated inthe first gradient operation and the offset vector (the initial vectorV0).

In step S406, the vector evaluating unit 104 finds an evaluated valueDFD(n) of the motion vector Vn obtained in the gradient operation and anevaluated value DFD(n−1) of the motion vector Vn−1 used as the offsetvector. The vector evaluating unit 104 determines whether the evaluatedvalue DFD(n) is less than the evaluated value DFD(n−1), that is, whetherthe motion vector Vn obtained in the gradient operation is higherreliable than the motion vector Vn−1 used as the offset vector.Specifically, for example, in the first processing, an evaluated valueDFD(1) of the obtained motion vector V1 is compared with an evaluatedvalue DFD(0) of the initial vector V0. In the second processing, anevaluated value DFD(2) of the obtained motion vector V2 is compared withthe evaluated value DFD(1) of the obtained motion vector V1.

If, in step S406, it is determined that the evaluated value DFD(n) isless than the evaluated value DFD(n−1), that is, the motion vector Vn ishigher reliable than the motion vector Vn−1, in step S407, the vectorevaluating unit 104 sets the calculated motion vector Vn (the motionvector V1 in the first time, the motion vector V2 in the second time) asa motion vector V in the detection block. The process proceeds to stepS408. In step S408, the vector evaluating unit 104 increments the numbern of repetition by one before the process proceeds to step S409. In stepS409, the vector evaluating unit 104 determines whether the number n ofrepetition has reached a set maximum number of repetition (e.g., two).If, in step S409, it is determined that the number n of repetition hasnot reached the set maximum number of repetition, the vector evaluatingunit 104 controls the selector 402 so that the process returns to stepS402 and repeats the subsequent steps.

In other words, in step S402, the motion vector V1 stored in the delayunit 405 after being output from the vector calculating unit 425 isselected as the offset vector by the selector 402. In step S403, thetemporal pixel difference calculating unit 411 and the pixel differencedetermining unit 412 execute the block-unit effective pixel determiningprocess by using the motion vector V1 as the offset vector, and theprocess repeats the subsequent steps. Therefore, the motion vector V2calculated in step S405 is the sum (i.e., V2=V1+v2=V0+v1+v2) of themotion vector v2 calculated in the second gradient operation and themotion vector V1 used as the offset vector.

If, in step S406, it is determined that the evaluated value DFD(n) isnot less than the evaluated value DFD(n−1), that is, the motion vectorVn−1 is higher reliable than the motion vector Vn, the vector evaluatingunit 104 proceeds to step S410. In step S410, the motion vector Vn−1(the initial vector V0 in the first time, the motion vector V1 in thesecond time) used as an offset in the gradient operation is set as themotion vector V in the detection block by the vector evaluating unit104, and the process proceeds to step S411. If, in step S409, it isdetermined that the number n of repetition has reached the set maximumnumber of repetition, the vector evaluating unit 104 proceeds to stepS411.

In step S411, the vector evaluating unit 104 determines whether themotion vector V is positioned in a search area set beforehand as a rangefor motion vector detection. If it is determined that the motion vectorV is positioned in the search area, the vector evaluating unit 104proceeds to step S415, and stores the motion vector V in the detectedvector memory 53 in a form associated with the detection block. Afterthat, the process ends.

In addition, if, in step S411, it is determined that the motion vector Vis not positioned in the search area, the vector evaluating unit 104proceeds to step S412 and sets the motion vector V as a zero vector.Proceeding to step S415, the vector evaluating unit 104 stores themotion vector V (zero vector) in the detected vector memory 53 andfinishes the recursive gradient operation process.

If, in step S404, it is determined that the number of effective pixelsin the effective pixel counter 413 is equal to or less than thepredetermined threshold value α, the gradient operation continuationdetermining unit 414 proceeds to step S413. In step S413, the gradientoperation continuation determining unit 414 controls the mode selectingunit 401 to select the pixel-unit processing mode before proceeding tostep S414. This allows each portion of the recursive gradient operationunit 103 to execute processing in units of pixels. In step S414, themode selecting unit 401 executes the pixel-unit recursive gradientoperation process, and proceeds to step S415. Details of the pixel-unitrecursive gradient operation process are described below with referenceto FIG. 37. Since the recursive gradient operation process in units ofpixels finds the motion vectors V of all the pixels in the detectionblock, in step S415, the vector evaluating unit 104 stores each motionvector V in the detected vector memory 53 in a form associated with eachpixel in the detection block, and the recursive gradient operationprocess ends.

In the above-described step S406, evaluation of motion vectorreliability is performed by comparing the evaluated value DFD(n) of themotion vector Vn obtained in the gradient operation process and theevaluated value DFD(n−1) of the motion vector Vn−1 used as the offsetvector. Simultaneously with comparison of the evaluated values DFD, theevaluation may be also performed by determining whether the value (|vn|)of the norm of the motion vector vn (motion vector obtained before theoffset vector is added) obtained in the gradient operation is less thana predetermined magnitude (e.g., 16 in the case of an 8-by-8-pixeloperation block).

A norm represents the magnitude of a vector in a vector space. Forexample, the norm of a vector v starting from the origin (0, 0) to (x,y) is represented by the following expression:|v|={square root}{square root over (x ² +y ² )}  (11)

In other words, In the gradient operation, in general, a highly accurateresult is obtained. However, when the norm |vn| of a motion vector,obtained in the gradient operation, exceeds a predetermined magnitude, ahighly accurate result for the large motion vector vn is not alwaysobtained. Accordingly, together with the evaluated value DFD, bydetermining whether the norm |vn| of each motion vector, obtained in thegradient operation, exceeds a predetermined magnitude, and excluding amotion vector whose norm |vn| exceeds the predetermined magnitude, inthis gradient operation, either for minute movement or for largemovement, a highly accurate result can be obtained, and the accuracy ofmotion vector detection can be improved.

In the case of determination based on the evaluated value DFD and thenorm, if, in step S406, |vn|≦16 and the evaluated value DFD(n−1)>theevaluated value DFD(n), the process proceeds to step S407, and settingis performed so that V=Vn. If, in step S406, |vn|>16 or the evaluatedvalue DFD(n−1)≦the evaluated value DFD(n), the process proceeds to stepS410, and setting is performed so that V=Vn−1.

Details of the effective pixel determining process are described belowwith reference to the flowchart shown in FIG. 35. FIG. 35 shows anexample of the effective pixel determining process in step S403 in FIG.34A.

When the offset vector is input from the selector 402, in step S431, thetemporal pixel difference calculating unit 411 controls the pixeldifference determining unit 412 to reset the effective pixel counter413. Proceeding to step S432, the temporal pixel difference calculatingunit 411 selects a pixel in a block-unit operation block, and proceedsto step S433. Pixels are selected from the top left end pixel in theorder of raster scanning.

In step S433, by using the offset vector, and frame t at time t andframe t+1 at time t+1 which are respectively input through theprefilters 102-2 and 102-1, time-base pixel difference Δt of theselected pixel, and outputs the calculated time-base pixel difference Δtto the pixel difference determining unit 412. The process proceeds tostep S434.

In step S434, the pixel difference determining unit 412 determineswhether the time-base pixel difference Δt calculated by the temporalpixel difference calculating unit 411 is less than a predetermined pixeldifference, that is, whether the calculated time-base pixel differenceΔt is effective in the gradient operation in the subsequent stage. If itis determined that the calculated time-base pixel difference Δt is lessthan the predetermined pixel difference, the process proceeds to stepS435. The pixel difference determining unit 412 increments the number ofeffective pixels in the effective pixel counter 413 by one, and theprocess proceeds to step S436. If, in step S412, it is determined thatthe time-base pixel difference Δt is equal to or greater than thepredetermined pixel difference, the pixel difference determining unit412 determines that the time-base pixel difference Δt is not effectivein the gradient operation in the subsequent stage, and skips over stepS435 and proceeds to step S436.

In step S436, the temporal pixel difference calculating unit 411determines whether processing on all the pixels in the operation blockhas finished. If the temporal pixel difference calculating unit 411 hasdetermined that the processing on all the pixels in the operation blockhas not finished, the process returns to step S432, and selects the nextpixel to repeat the subsequent steps. If, in step S436, the temporalpixel difference calculating unit 411 has determined that the processingon all the pixels in the operation block has finished, the effectivepixel determining process ends to return to step S404 in FIG. 34A.

In the above process, the effective pixel counter 413 has the countednumber of pixels in each of which the pixel difference Δt is less thanthe predetermined pixel difference and the pixel is effective in thegradient operation in the subsequent stage. Accordingly, by referring tothe number of pixels of the effective pixel counter 413 in step S404 inFIG. 34A, the gradient operation continuation determining unit 414 candetermine whether to perform the block-unit gradient operation orwhether to the pixel-unit gradient operation.

As noted above, the operation shown in FIG. 34A shows a recursivegradient operation in a combination of block-unit, pixel-unit, and 0vector processing modes with a block basis.

Turning now to FIG. 34B, a recursive gradient operation is described ina combination of a block-unit and 0 vector processing mode. Theoperations shown in FIG. 34B are the same as in FIG. 34A except thatafter step S404 the operation proceeds to a step S416 in which a 0vector V=0 is provided when the number of pixels is less than thethreshold value α. The operation then proceeds to step S415.

Thus, with the recursive gradient operation shown in FIG. 34B asimplified operation can be realized such that if a number of effectivepixels is not greater than the threshold value α a 0 vector is provided.

FIG. 34C shows an operation for a recursive gradient operation in acombination of block-unit, pixel-unit, and 0 vector processing modeswith a pixel basis. More particularly, the operation shown in FIG. 34Cimplements steps S413-S413 for a pixel that is not in a group ofeffective pixels in a case the number of effective pixels is greaterthan a predetermined threshold value at step S404, and stores a motionvector from step S414 for the pixel that is not in the group of theeffective pixels and a motion vector from either step S411 or step S412for each pixel in a group of the effective pixels at step S415 in thedetected vector memory 53. Steps S413-S414 are also implemented for eachpixel in a detection block (operation block) in a case the number ofeffective pixels is not greater than a predetermined threshold value atstep S404. More particularly, in FIG. 34C after step S404, if the numberof effective pixels is determined to be greater than the threshold valueα, i.e. Yes in step S404, the operation proceeds to step S417. Theoperation block includes a group of effective pixels and/or a group ofnon-effective pixels. At step S417, it is determined whether a group inquestion is in the group of the effective pixels. The operation for thegroup of the effective pixels, i.e. Yes in step S417, is then proceededto step S405 and a block-unit processing mode is implemented with onlythe effective pixels. If the pixel in question is not in the group ofthe effective pixels, i.e. No in step S417, the operation proceeds tostep S413 to select a pixel-unit processing mode, and then steps S413and steps S414 are implemented as in the operation in FIG. 34A.

This operation of the recursive gradient operation with a combination ofthe block-unit, pixel-unit, and 0 vector processing modes with a pixelbasis in FIG. 34C has a more complicated detection operation, butprovides the higher accuracy as it can deal with non-effective pixels ina block of the block-unit processing mode that the recursive gradientoperations in FIGS. 34A and 34B cannot fully deal with.

The recursive gradient operation including the block-unit and 0 vectorprocessing modes in FIG. 34B has a lowest computation impact among theexamples shown in FIGS. 34A-34C, but nevertheless can still allow anincrease in an accuracy of detecting a motion vector by limiting pixelsproviding a negative effect on the gradient operation and not usingthose pixels for detecting a motion vector.

The operation of the recursive gradient operation in FIG. 34A providinga combination of a block-unit, pixel-unit, and 0 vector processing modeswith a block basis provides a middle level of computation but can dealwith pixels in a block/blocks which only a block-unit processing mode asshown in FIG. 34B cannot fully deal with, especially in a case thenumber of effective pixels of a block of the block-unit processing modeis not greater than a predetermined threshold value.

Next, details of the block-unit gradient operation process are describedbelow with reference to the flowchart shown in FIG. 36. FIG. 36 shows anexample of the block-unit gradient operation process in step S405 inFIG. 34. Accordingly, in the example in FIG. 36, the flag (flg=1) forexecuting the gradient operation is input from the gradient operationcontinuation determining unit 414 to the temporal pixel differencecalculating unit 421.

When the flag (flg=1) is input from the gradient operation continuationdetermining unit 414, in step S451, the temporal pixel differencecalculating unit 421 selects a pixel in the block-unit operation blockand proceeds to step S452. Pixels are selected from the top left endpixel in the operation block in the order of raster scanning.

In step S452, by using the offset vector from the selector 402, andframe t at time t and frame t+1 at time t+1 which are respectively inputthrough the prefilters 102-2 and 102-1, the temporal pixel differencecalculating unit 421 calculates time-base pixel difference Δt of theselected pixel, and outputs the calculated time-base pixel difference Δtand the offset vector to the pixel difference determining unit 422. Theprocess proceeds to step S453.

In step S453, the pixel difference determining unit 422 determineswhether the time-base pixel difference Δt calculated by the temporalpixel difference calculating unit 421 is less than a predetermined pixeldifference, that is, whether the selected pixel is effective in thegradient operation in the subsequent stage. If it is determined that thetime-base pixel difference Δt is less than the predetermined pixeldifference, the process proceeds to step S454, and the pixel differencedetermining unit 422 controls the horizontal-and-vertical pixeldifference calculating unit 423 to calculate a horizontal pixeldifference Δx of the pixel determined to be effective. The predeterminedpixel difference in the pixel difference determining unit 422 may beeither equal to or different from the predetermined pixel difference inthe temporal pixel difference calculating unit 421. At this time, thepixel difference determining unit 422 outputs the calculated time-basepixel difference Δt calculated by the temporal pixel differencecalculating unit 421 and the offset vector to thehorizontal-and-vertical pixel difference calculating unit 423.

In step S454, by using the offset vector, and frame t at time t andframe t+1 at time t+1 which are respectively input through theprefilters 102-2 and 102-1, the horizontal-and-vertical pixel differencecalculating unit 423 calculates horizontal pixel difference Δx of thepixel determined to be effective. Proceeding to step S455, thehorizontal-and-vertical pixel difference calculating unit 423 calculatesvertical pixel difference Δy of the pixel determined to be effective,and outputs the time-base pixel difference Δt, horizontal pixeldifference Δx, and vertical pixel difference Δy to the gradientaccumulation unit 424. The process proceeds to step S456.

In step S456, the gradient accumulation unit 424 accumulates thetime-base pixel difference Δt, horizontal pixel difference Δx, andvertical pixel difference Δy, and outputs the accumulated result to thevector calculating unit 425. The process proceeds to step S457.

If, in step S453, it is determined that the time-base pixel differenceΔt is equal to or greater than the predetermined pixel difference, thepixel difference determining unit 422 skips over steps S454 to 456 andproceeds to step S457. In other words, the pixel differences (gradient)of the pixel indicates that the pixel is not used in the gradientoperation since it is not effective in the gradient operation in thesubsequent stage.

In step S457, the temporal pixel difference calculating unit 421determines whether processing on all the pixels in the operation blockhas finished. If it is determined that the processing on all the pixelsin the operation block has not finished, the process returns to stepS451, and selects the next pixel to repeat the subsequent steps.Alternatively, if, in step S457, it is determined that the processing onall the pixels in the operation block has finished, the temporal pixeldifference calculating unit 421 outputs the offset vector to the vectorcalculating unit 425, and the process proceeds to step S458. Whenreceiving the offset vector from the temporal pixel differencecalculating unit 421, the vector calculating unit 425 calculates amotion vector vn by using the gradient accumulation result from thegradient accumulation unit 424 and the least squares method inExpression (9), and proceeds to step S459. The vector calculating unit425 calculates a motion vector Vn by adding the calculated motion vectorvn to the offset vector from the temporal pixel difference calculatingunit 421, and outputs the calculated motion vector Vn to the vectorevaluating unit 104. The gradient operation process ends and returns tostep S406 in FIG. 34.

As described above, when time-base pixel difference Δt is equal to orgreater than a set predetermined pixel difference, the pixel is regardedas having a possibility of generating irregularity in movement, and isthus excluded from the gradient operation in the case of motion vectordetection. Thus, more stable gradient operation is executed, so that aprobable motion vector is detected, thus improving the accuracy ofmotion vector detection.

Next, details of the pixel-unit recursive gradient operation process aredescribed below with reference to the flowchart shown in FIG. 37. FIG.37 shows an example of the pixel-unit recursive gradient operationprocess in step S414 in FIG. 34. This process is executed for each pixelin the detection block.

After setting the pixel-unit processing mode, in step S471, the modeselecting unit 401 selects a pixel in the detection block as a pixelwhich is subject to detection, and outputs the initial vector V0 of thepixel in an operation block (e.g., 9 by 9 pixels) to the selector 402and the vector evaluating unit 104. The process proceeds to step S472.Pixels are selected from the top left end pixel in the detection blockin the order of raster scanning. In step S472, in response to control bythe vector evaluating unit 104, the selector 402 selects the initialvector V0 input from the mode selecting unit 401 as an offset vector,and outputs the selected offset vector to the temporal pixel differencecalculating unit 411 and the temporal pixel difference calculating unit421. The process proceeds to step S473.

In step S473, the temporal pixel difference calculating unit 411 and thepixel difference determining unit 412 execute the pixel-unit effectivepixel determining process by using the selected offset vector (by usingthe initial vector V0 as an offset), and the process proceeds to stepS474. A detailed description of the details of the effective pixeldetermining process is omitted since basically similar processing isperformed, excluding that the block-unit effective pixel determiningprocess described with reference to FIG. 5 and the operation block(block range and pixels constituting the block), which is subject toprocessing, differ. In the effective pixel determining process, theeffective pixel counter 413 has a counted number of pixels eachdetermined to have, in a pixel-unit operation block, the pixeldifference less than the predetermined pixel difference, that is, to beeffective in the gradient operation in the subsequent stage. Thepredetermined pixel difference for use in effective pixel determinationin units of pixels may be either equal to or different from the value inthe case of determination in units of blocks.

In step S474, the gradient operation continuation determining unit 414determines whether the counted number of pixels (the number of effectivepixels) in the effective pixel counter 413 is greater than apredetermined threshold value β. If it is determined that the number ofeffective pixels is greater than the predetermined threshold value β,the gradient operation continuation determining unit 414 outputs a flag(flg=1) for executing the gradient operation, and proceeds to step S475.Also the threshold value β may be either equal to or different from thethreshold value α in the block-unit case.

In step S475, based on the flag from the gradient operation continuationdetermining unit 414, the gradient operation unit 404 executes thepixel-unit gradient operation process by using the offset vector (theinitial vector V0) from the selector 402, and the process proceeds tostep S476. A detailed description of the gradient operation process isomitted since basically similar processing is performed, excluding thatthe block-unit gradient operation process described with reference toFIG. 36 and the operation block (range and pixels constituting theblock), which is subject to processing, differ. This gradient operationprocess finds the motion vector Vn of the pixel, which is subject todetection, and outputs the obtained motion vector Vn to the vectorevaluating unit 104 and the delay unit 405. The motion vector Vn is thesum (Vn=Vn−1+vn) of the motion vector vn obtained by the first gradientoperation and the offset vector.

In step S476, the vector evaluating unit 104 finds an evaluated valueDFD(n) of the motion vector Vn calculated by the gradient operationprocess and an evaluated value DFD(n−1) of the motion vector Vn−1 usedas the offset, and determines whether the evaluated value DFD(n) is lessthan the evaluated value DFD(n−1), that is, whether the motion vector Vncalculated by the gradient operation process is higher reliable than themotion vector Vn−1 used as the offset.

If, in step S476, it is determined that the evaluated value DFD(n) isless than the evaluated value DFD(n−1), that is, the motion vector Vn ishigher reliable than the motion vector Vn−1, in step S477, thecalculated motion vector Vn (a motion vector V1 in the first time, amotion vector V2 in the second time) is set as the motion vector V ofthe pixel which is subject to detection, and the process proceeds tostep S478. In step S478, the vector evaluating unit 104 increments thenumber n of repetition by one. Proceeding to step S479, the vectorevaluating unit 104 determines whether the number n of repetition hasreached the maximum number of repetition (e.g., 2). If it is determinedthat the number n of repetition has not reached the maximum number ofrepetition, the vector evaluating unit 104 controls the selector 402 toreturn to step S472 to repeat the subsequent steps.

In other words, in step S472, the motion vector V1 stored in the delayunit 405 after being output from the vector calculating unit 425 isselected as the offset vector by the selector 402. In step S473, thetemporal pixel difference calculating unit 411 and the pixel differencedetermining unit 412 offsets the motion vector V1, which is the offsetvector, and executes the pixel-unit effective pixel determining processto repeat the subsequent steps. Thus, the motion vector V2 obtained instep S475 is the sum (V2=V0+v1+v2) of the motion vector V2 calculated inthe second gradient operation and the motion vector V1 as the offset.

If, in step S476, it is determined that the evaluated value DFD(n) isgreater than the evaluated value DFD(n−1), that is, the motion vectorVn−1 is higher reliable than the motion vector Vn, the process proceedsto step S480. In step S480, the motion vector Vn−1 (initial vector V0 inthe first time, motion vector V1 in the second time) used as the offsetin the gradient operation is set as the motion vector V in the detectionblock, and the process proceeds to step S481. In addition, if, in stepS479, the number n of repetition has reached the maximum number ofrepetition, the vector evaluating unit 104 proceeds to step S481.

In step S481, the vector evaluating unit 104 determines whether themotion vector V is in a search area set beforehand as a motion vectordetecting range. If it is determined that the motion vector V is in thesearch area, the process proceeds to step S483. If, in step S481, it isdetermined that the motion vector V is not in the search area, theprocess proceeds to step S482, and the motion vector V is set as a zerovector. The process proceeds to step S483.

If, in step S473, it is determined that the pixel of effective pixels inthe effective pixel counter 413 is less than the predetermined thresholdvalue β, the gradient operation continuation determining unit 414outputs, to the gradient operation unit 404, a flag (flg=0) for abortingthe gradient operation, and the process proceeds to step S482. Thetemporal pixel difference calculating unit 421 controls the vectorcalculating unit 425 based on the flag, and sets the motion vector V asa zero vector. The process proceeds to step S483.

In step S483, the mode selecting unit 401 determines whether processingon all the pixels in the detection block has finished. If it isdetermined that the processing on all the pixels in the detection blockhas not finished, the process returns to step S471. The next pixel inthe detection block is used as a pixel which is subject to detection,and the subsequent steps are repeated. If, in step S483, it isdetermined that the processing on all the pixels in the detection blockhas finished, the mode selecting unit 401 finishes the pixel-unitrecursive gradient operation process, and returns to step S415 in FIG.34. In other words, the pixel-unit recursive gradient operation processfinds the motion vectors V of all the pixels in the detection block, theprocess returns to step S415 in FIG. 34, and the vector evaluating unit104 store each motion vector V in the detected vector memory 53 in aform associated with each pixel in the detection block. After that, therecursive gradient operation process ends.

In evaluation of motion vector reliability in step S476, similarly tothe case of step S406, both determination based on the evaluated valueDFD and determination based on the norm may be used in combination.

As described above, by using, for the gradient operation, only pixels ineach of which the pixel difference in the operation block is less thanthe predetermined pixel difference, pixels having different movementscan be excluded from a block for which arithmetic operation is to beperformed, so that motion vector probability obtained by the gradientoperation is improved, thus improving the accuracy of motion vectordetection.

In addition, when the number of pixels, which are not used in thegradient operation since a pixel difference in the operation block isgreater than a predetermined pixel difference, is greater than apredetermined threshold value, the gradient operation process isadaptively controlled. Thus, in particular, in a movement boundarybetween objects, the accuracy of motion vector detection can beimproved, so that the probability can be improved compared with a motionvector to be detected.

Specifically, when the number of pixels, which are not used in thegradient operation since the pixel difference in the operation block isgreater than the predetermined pixel difference, is greater than thepredetermined threshold value, the block-unit mode is switched to thepixel-unit mode, an operation block is set for each pixel in a detectionblock, and the effective pixel determining process and the gradientoperation process are performed. Thus, more accurate detection of motionvector can be performed. In addition, when the number of pixels, whichare not used in the gradient operation since the pixel difference in theoperation block is greater than the predetermined pixel difference, isgreater than the predetermined threshold value, irregular motion vectordetection can be suppressed, thus enabling more secure motion vectordetection.

Next, other configurations of an effective pixel determining unit 403and a gradient operation unit 404 are described below.

In the effective pixel determining unit 403 and gradient operation unit404, which are described below, not only based on a time-base pixeldifference, but also based on spatial pixel differences, it isdetermined whether the pixels in the operation block are effective.

FIG. 38 is a detailed block diagram showing the configuration of theeffective pixel determining unit 403. The effective pixel determiningunit 403 shown in FIG. 38 shows another configuration of the effectivepixel determining unit 403 shown in FIG. 25. In FIG. 38, portionscorresponding to those in FIG. 26 are denoted by corresponding referencenumerals. Accordingly, a repeated description thereof is omitted.

In the example shown in FIG. 38, the effective pixel determining unit403 includes a first spatial-gradient-pixel-difference calculating unit501, a second spatial-gradient-pixel-difference calculating unit 502, atime-base pixel difference calculating unit 503, an operationdetermining unit 504, an effective pixel counter 413, and a gradientoperation continuation determining unit 414.

Frame t+1 at time t+1 input through the prefilters 102-1 is input to thefirst spatial-gradient-pixel-difference calculating unit 501 and thetime-base pixel difference calculating unit 503. Frame t at time t inputthrough the prefilter 102-2 are input to the secondspatial-gradient-pixel-difference calculating unit 502 and the time-basepixel difference calculating unit 503. In addition, the offset vector(e.g., V0 or Vn−1) selected by the selector 402 is input to the firstspatial-gradient-pixel-difference calculating unit 501, the secondspatial-gradient-pixel-difference calculating unit 502, and thetime-base pixel difference calculating unit 503.

When receiving the offset vector selected by the selector 402, the firstspatial-gradient-pixel-difference calculating unit 501 calculateshorizontal pixel difference Δx and vertical pixel difference Δy of apixel, in the operation block in either unit processing mode, which arearound a pixel obtained by offseting the offset vector in frame t+1input through the prefilter 102-1. The firstspatial-gradient-pixel-difference calculating unit 501 outputs, to theoperation determining unit 504, the calculated horizontal pixeldifference Δx and vertical pixel difference Δy in the operation block inframe t+1.

When receiving the offset vector selected by the selector 402, thesecond spatial-gradient-pixel-difference calculating unit 502 calculateshorizontal pixel difference Δx and vertical pixel difference Δy of apixel, in the operation block in either unit processing mode, which arearound a pixel obtained by offseting the offset vector in frame t inputthrough the prefilter 102-2. The first spatial-gradient-pixel-differencecalculating unit 502 outputs, to the operation determining unit 504, thecalculated horizontal pixel difference Δx and vertical pixel differenceΔy in the operation block in frame t.

When receiving the offset vector selected by the selector 402, thetime-base pixel difference calculating unit 503 calculates time-basepixel difference Δt of a pixel, in the operation block in either unitprocessing mode, which are around a pixel obtained by offsetting theoffset vector between frame t+1 and frame t input through the prefilters102-1 and 102-2, and outputs the calculated time-base pixel differenceΔt in the operation block between both frames to the operationdetermining unit 504.

By using horizontal pixel difference Δx and vertical pixel difference Δyin the operation block frame t+1 from the firstspatial-gradient-pixel-difference calculating unit 501, horizontal pixeldifference Δx and vertical pixel difference Δy in the operation block inframe t from the second spatial-gradient-pixel-difference calculatingunit 502, time-base pixel difference Δt in the operation block betweenframe t+1 and frame t from the time-base pixel difference calculatingunit 503, the operation determining unit 504 performs predeterminedlogical operation, and determines, based on the predetermined logicaloperation, whether a pixel in the operation block is effective in motionvector detection (i.e., arithmetic operation in the gradient operationunit 404 in the subsequent stage). Details of the logical operation,which is an effective pixel determining method in the operationdetermining unit 504, are described later.

When it is determined that the pixel in the operation block is effectivein motion vector detection, the operation determining unit 504increments the number of pixels in the effective pixel counter 413 byone. The effective pixel counter 413 counts the number of pixels whichare determined as effective pixels in each operation block by theoperation determining unit 504.

FIG. 39 is a detailed block diagram showing the configuration of thegradient operation unit 404. The effective pixel determining unit 403shown in FIG. 38 shows another configuration of the gradient operationunit 404 shown in FIG. 25. In FIG. 39, portions corresponding to thosein FIG. 27 are denoted by corresponding reference numerals. Accordingly,a repeated description thereof is omitted.

In the example shown in FIG. 39, the gradient operation unit 404includes a first spatial-gradient-pixel-difference calculating unit 521,a second spatial-gradient-pixel-difference calculating unit 522, atime-base pixel difference calculating unit 523, a operation determiningunit 524, a gradient accumulation unit 424, and a vector calculatingunit 425.

Frame t+1 at time t+1 input through the prefilter 102-1 is input to thefirst spatial-gradient-pixel-difference calculating unit 521 and thetime-base pixel difference calculating unit 523. Frame t at time t inputthrough the prefilter 102-2 is input to the secondspatial-gradient-pixel-difference calculating unit 522 and the time-basepixel difference calculating unit 523. In addition, the offset vectorselected by the selector 402 is input to the firstspatial-gradient-pixel-difference calculating unit 521, the secondspatial-gradient-pixel-difference calculating unit 522, the time-basepixel difference calculating unit 523, and the operation determiningunit 524. The flag input from the effective pixel determining unit 403is input to the operation determining unit 524.

When receiving the offset vector selected by the selector 402, the firstspatial-gradient-pixel-difference calculating unit 521 calculateshorizontal pixel difference Δx and vertical pixel difference Δy of thepixel, in the operation block in either unit processing mode, which arearound a pixel obtained by offseting the offset vector in frame t+1input through the prefilter 102-1. The firstspatial-gradient-pixel-difference calculating unit 521 outputs, to theoperation determining unit 524, the calculated horizontal pixeldifference Δx and vertical pixel difference Δy in the operation block inframe t+1.

When receiving the offset vector selected by the selector 402, thesecond spatial-gradient-pixel-difference calculating unit 522 calculateshorizontal pixel difference Δx and vertical pixel difference Δy of thepixel, in the operation block in either unit processing mode, which arearound a pixel obtained by offseting the offset vector in frame t inputthrough the prefilter 102-2. The secondspatial-gradient-pixel-difference calculating unit 522 outputs, to theoperation determining unit 524, the calculated horizontal pixeldifference Δx and vertical pixel difference Δy in the operation block inframe t.

When receiving the offset vector selected by the selector 402, thetime-base pixel difference calculating unit 523 calculates time-basepixel difference Δt of the pixel, in the operation block in either unitprocessing mode, which is around a pixel obtained by offsetting theoffset vector between frame t+1 and frame t input through the prefilters102-1 and 102-2, and outputs the calculated time-base pixel differenceΔt in the operation block between both frames to the operationdetermining unit 524.

The operation determining unit 524 controls the gradient accumulationunit 424 and the vector calculating unit 425 based on the flag inputfrom the effective pixel determining unit 403.

When the flag represents one (flg=1), by using horizontal pixeldifference Δx and vertical pixel difference Δy in the operation blockframe t+1 from the first spatial-gradient-pixel-difference calculatingunit 521, horizontal pixel difference Δx and vertical pixel differenceΔy in the operation block in frame t from the secondspatial-gradient-pixel-difference calculating unit 522, time-base pixeldifference Δt in the operation block between frame t+1 and frame t fromthe time-base pixel difference calculating unit 523, the operationdetermining unit 524 performs predetermined logical operation. Based onthe predetermined logical operation, the operation determining unit 524determines whether the pixel in the operation block is effective inmotion vector detection. The operation determining unit 524 treats, aswhat is subject to the gradient operation, pixels determined to beeffective in motion vector detection, and supplies the gradientaccumulation unit 424 with horizontal pixel difference Δx, verticalpixel difference Δy, and time-base pixel difference At of each pixel.When it is determined that the pixel in the operation block is noteffective in motion vector detection, the operation determining unit 524controls the gradient accumulation unit 424 to stop processing on thepixel.

In addition, when the flag represents zero (flg=0), the operationdetermining unit 524 does not execute the predetermined logicaloperation and it is not determined that the pixel in the block iseffective in motion vector detection. Thus, the gradient accumulationunit 424 does not execute accumulation, so that the process is aborted.

At this time, the temporal pixel difference calculating unit 421controls the vector calculating unit 425 to set the motion vector V as azero vector. In addition, when processing on the pixels in the operationblock finishes, the operation determining unit 524 outputs the offsetvector to the vector calculating unit 425, and controls the vectorcalculating unit 425 to calculate a motion vector in the block which issubject to detection.

The gradient accumulation unit 424 accumulates the time-base pixeldifference Δt the horizontal pixel difference Δx and vertical pixeldifference Δy supplied by the operation determining unit 524, andoutputs the accumulated gradient to the vector calculating unit 425.

When receiving the offset vector from the operation determining unit524, the vector calculating unit 425 calculates the gradient accumulatedby the gradient accumulation unit 424, and calculates motion vector vnby using the least square addition. In addition, the vector calculatingunit 425 finds motion vector Vn by adding the offset vector from theoperation determining unit 524 to the calculated motion vector vn, andoutputs the obtained motion vector Vn to the vector evaluating unit 104and the delay unit 405.

FIG. 40 shows other examples of a detection block which is subject tomotion vector detection and an operation block which is subject to thegradient operation and which corresponds the detection block. In FIG.40, frame t is shown and circles in frame t indicate pixels.

The example shown in FIG. 40 shows, in frame t, detection blocks K1 toK3 each consisting of four by four pixels, and operation blocks E1 toE3, each consisting of eight by eight pixels, around the detectionblocks K1 to K3. Each of operation blocks E1 to E3 overlaps with anadjacent operation block in half the number of pixels.

In the vector detecting unit 52, motion vector detection is executedfrom the top left end detection block in frame in raster scanning order.Accordingly, in frame t, detection blocks K1 to K3 are sequentially usedas detection blocks in which motion vector detection is performed.Correspondingly, operation blocks E1 to E3 serve as operation blocks forthe gradient method. In other words, in the example shown in FIG. 40,each of operation blocks E1 to E3 overlaps with an adjacent operationblock in half the number of pixels constituting the operation block.

In the following description, the effective pixel determining unit 403in FIG. 38 and the effective pixel determining unit 403 in FIG. 39 aredescribed by using a detection block and operation block formed asdescribed above. However, the description is not limited to the abovedetection block and operation block. In the effective pixel determiningunit 403 in FIG. 38 and the gradient operation unit 404 in FIG. 39, thedetection block and operation block described above with reference toFIG. 28 may be used, and other detection block and operation block maybe used.

Next, the effective pixel determining method is described below withreference to FIG. 41. In the example shown in FIG. 41, the arrow Tindicates a direction of lapse of time from frame t at time t, which ispositioned on the left side of the foreground in FIG. 41, to frame t+1at time t+1, which is positioned on the right side of the background inFIG. 41.

In frame t, detection block Kt (indicated by the black circles in FIG.41), each consisting of four by four pixels from which motion vectorsare to be detected, and operation block E (in the periphery of) arounddetection block Kt, each consisting of eight by eight pixels, are shown.In addition, in frame t+1, detection block Kt+1 (indicated by the blackcircles in FIG. 41) corresponding to detection block Kt, each consistingof four by four pixels, and operation block Et+1 corresponding tooperation block Et, each consisting of eight by eight pixels, are shown.The dotted line block in frame t+1 indicates a block identical in phaseto detection block Kt. Accordingly, in frame t+1, operation block Et+1at a position shifted (moved) from the dotted line block by givingmotion vector V(Vx, Vy) is used as a block subject to the gradientoperation.

A time-base pixel difference between pixel p1 in operation block Et inframe t and pixel p2 at an identical position in operation block Et+1 inframe t+1 is represeted by Δt, and the image frame at this time isrepresented by w, horizontal pixel difference Δx1, vertical pixeldifference Δy, and time-base pixel difference Δt of pixel p1 inoperation block Et are found by the following expressions:Δx1=Yt(k+1)−Yt(k)   (12)Δy1=Yt(k+w)−Yt(k)   (13)Δt=Yt+1(k)−Yt(k)   (14)where Yt+1 represents a pixel value, Yt represents a pixel value at timet, and each of k+1 and k represents an address (position).

In addition, horizontal pixel difference Δx2 and vertical pixeldifference Δy2 of pixel p2 in operation block Et+1 corresponding topixel p1 are similarly found.

The operation determining unit 504 uses these values to perform logicaloperation, and performs effective pixel determination based on theresult of logical operation. In other words, by finding whether a pixelin operation block Et satisfies one of the following Expressions (15) to(17) (i.e., satisfies Expression (18)), the operation determining unit504 determines whether the pixel is effective in motion vectordetection.Δx1≠0 && Δx2≠0 && |Δx1|>th1•|Δy1&& |t/Δx1−Δt/Δx2|<th2   (15)Δx1≠0 && Δx2≠0 && |Δy1|>th1•|Δx1&& |t/Δy1−Δt/Δy2|<th2   (16)Δx1≠0 && Δx2≠0 && Δy1≠0 && Δy2≠0 && |Δt/Δx1−Δt/Δx2|<th2 &&|Δt/Δy1−Δt/Δy2|<th2 &&   (17)Expression (15)||Expression (16)||Expression (17)   (18)where || represents logical addition, && represents logicalmultiplicatin, • represetns multiplication, and th1 and th2 representpredetermined threshold values. For example, th1 is 1, 1.5, or 2, andth2 is, for example, 4.

Therefore, the representation Δx1≠0 && Δx2≠0 in Expression (15)indicates that horizontal gradients of pixels p1 and p2 are not flat,that is, both have horizontal gradient. The representation|Δx1|>th1•|Δy1| indicates that horizontal gradient is greater to someextent than vertical gradient. The representation |Δt/Δx1−Δt/Δx2|<th2indicates that horizontal movement in the pixel-unit gradient method (inthe case of normalization) is a predetermined threshold value th2, thatis, the horizontal movement has similarity. Accordingly, Expression (15)represents the condition concerning the horizontal direction. When apixel satisfies all the conditions, it is determined that the pixel hassimilarity in horizontal movement and is effective in the gradientmethod in the subsequent stage.

In Expression (16), the representation Δy1≠0 && Δy2≠0 indicates thatvertical gradient is not flat, that is, both have vertical gradient. Therepresentation |Δy1|>th1•|Δx1| indicates that vertical gradient isgreater to some extent than horizontal gradient. The representation|Δt/Δy1−Δt/Δy1|<th2 indicates that vertical movement in the pixel-unitgradient method (in the case of normalization) has similarity.Accordingly, Expression (16) represents the condition concerning thevertical direction. When a pixel satisfies all the conditions, it isdetermined that the pixel has similarity in vertical movement and iseffective in the gradient method in the subsequent stage.

Similarly, in Expression (17), the representation Δx1≠0 && Δx2≠0 &&Δy1≠0 && Δy2≠0 indicates that vertical and horizontal gradients are notflat, that is, gradient is found in the vertical and horizontaldirections. The representation |Δt/Δx1−Δt/Δx2|<th2 &&|Δt/Δy1−Δt/Δy2|<th2 indicates that vertical and horizontal movements inthe gradient method in units of pixels (in the case of normalization)have similarity. Accordingly, Expression (17) represents the conditionsconcerning both the horizontal and vertical directions (obliquedirection) for a pixel that does not satisfy Expressions (15) and (16).When a pixel that satisfies all the conditions, it is determined thatthe pixel has similarity in horizontal and vertical movements and iseffective in the gradient method in the subsequent stage.

In other words, the operation determining unit 504 uses Expression (18)to determine in which of horizontal, vertical, and oblique movements,each pixel in operation block Et has similarity. If there is a pixeldetermined to have no similarity in any movement, the operationdetermining unit 504 exclude the pixel from pixels subject to thegradient operation, as shown in FIG. 42.

FIG. 42 shows an example of the configuration of pixels in an operationblock. In the example shown in FIG. 42, in operation block E consistingof eight by eight pixels (64 pixels), around detection block Kconsisting of four by four pixels, pixels (indicated by the whitecircles in FIG. 42) determined as effective pixels since the pixelssatisfy Expression (18), and pixels (indicated by the black circles)that are not used in the gradient operation since the pixels do notsatisfy Expression (18) are shown.

Accordingly, the gradient operation unit 404 performs the gradientoperation by using only the pixels (34 pixels) determined as effectivepixels in operation block E. Since this causes the gradient operation tobe executed by using only pixels having similarity in one of thehorizontal, vertical, and oblique movements, inclusion of differentmovement is suppressed and more stable gradient operation is executed,so that a probable motion vector is detected.

However, when the number of pixels determined as effective pixels in theoperation block is small, the gradient operation may be unstable, asdescribed above. Accordingly, the gradient operation continuationdetermining unit 414 determines whether the number or pixels determinedas effective pixels is 50% (greater than 32 pixels in all the 64pixels). If the number or pixels determined as effective pixels is lessthan 50%, it is determined that the gradient operation on detectionblock K in units of blocks is unstable. Accordingly, as described abovewith reference to FIG. 33, the gradient operation is switched tooperation on each of the pixels in detection block K. Although thethreshold value of the effective pixel counter is set to 50%, obviously,this value may be another value.

This prevents pixels having different movements from being included asmuch as possible, thus enabling stable gradient operation. As a result,the probability of the motion vector found by the gradient operation isimproved, thus improving the accuracy of motion vector detection.

Regarding the effective pixel determining method in the operationdetermining unit 504, the following conditional Expressions (19) and(20) can be used. In other words, by finding whether a pixel inoperation block Et satisfies both expressions, that is, whether thepixel satisfies Expression (21), the operation determining unit 504 maydetermines whether the pixel is effective.Δx1≠0 && Δx2≠0 && |Δt/Δx1−Δt/Δx2|<th3   (19)Δy1≠0 && Δy2≠0 && |Δt/Δy1−Δt/Δx2|<th3   (20)Expression (19) && Expression (20)   (21)where && represents logical multiplication, and th3 represents apredetermined threshold value. In each expression, th3≠th2. For example,although th3 is 16, it may be less than th2.

In other words, in the case of Expression (21), similarity determinationis performed for both horizontal and vertical movements. Accordingly theoperation determining unit 504 uses Expression (18) to determineswhether a pixel in operation block Et has similarity in both bothhorizontal and vertical movements. If it is determined that a pixel hasno similarity in at least one of horizontal and vertical movements, theoperation determining unit 504 excludes the pixel from pixels subject tothe gradient operation.

Next, details of the effective pixel determining process are describedbelow with reference to the flowchart shown in FIG. 43. FIG. 43 shows anexample of the effective pixel determining process in step S403 in FIG.34.

When the offset vector is input from the selector 402, in step S431, thetime-base pixel difference calculating unit 503 controls the operationdetermining unit 504 to reset the effective pixel counter 413.Proceeding to step S512, the time-base pixel difference calculating unit503 selects a pixel in a block-unit operation block, and proceeds tostep S513. Pixels are selected from the top left end pixel in rasterscanning order.

In step S513, the time-base pixel difference calculating unit 503calculates time-base pixel difference Δt of a pixel in the operationblock in either unit processing mode by using, as a reference, a pixelcalculated by offsettingn the offset vector between frame t+1 inputthrough the prefilter 102-1 and frame t input through the prefilter102-2. The calculated time-base pixel difference Δt between frame t+1and frame t is output to the operation determining unit 504, and theprocess proceeds to step S514.

When receiving the offset vector selected by the selector 402, in stepS514, the first spatial-gradient-pixel-difference calculating unit 501calculates horizontal pixel difference Δx and vertical pixel differenceΔy of the pixel in the operation block in either unit processing mode byusing, as a reference, a pixel calculated by offsettin the offset vectorin frame t+1 input through the prefilter 102-1. The calculatedhorizontal pixel difference Δx and vertical pixel difference Δy in theoperation block in frame t+1 are output to the operation determiningunit 504, and the process proceeds to S515.

When receiving the offset vector selected by the selector 402, in stepS515, the second spatial-gradient-pixel-difference calculating unit 502calculates horizontal pixel difference Δx and vertical pixel differenceΔy of the pixel in the operation block in either unit processing mode byusing, as a reference, a pixel calculated by offsettin the offset vectorin frame t input through the prefilter 102-2. The calculated horizontalpixel difference Δx and vertical pixel difference Δy in the operationblock in frame t are output to the operation determining unit 504, andthe process proceeds to S516.

In step S516, by using the horizontal pixel difference Δx and verticalpixel difference Δy in the operation block in frame t+1 output from thefirst spatial-gradient-pixel-difference calculating unit 501, thehorizontal pixel difference Δx and vertical pixel difference Δy in theoperation block in frame t output from the secondspatial-gradient-pixel-difference calculating unit 502, and thetime-base pixel difference Δt in the operation block between frame t+1and frame t output from the time-base pixel difference calculating unit503, the operation determining unit 504 performs logical operationrepresented in Expression (18). In steps S517 to S519, based on thelogical operation, the operation determining unit 504 determines whetherthe pixel in the operation block is effective in motion vector detection(i.e., arithmetic operation in the gradient operation unit 404 in thesubsequent stage).

In other words, in step S516, the operation determining unit 504performs operations based on Expression (15), which is a conditionconcerning the horizontal direction, Expression (16), which is acondition concerning the vertical direction, and Expression (17), whichis conditions concerning the horizontal and vertical directions. In stepS517, the operation determining unit 504 determines whether the pixel inthe operation block satisfies Expression (15), which is the conditionconcerning the horizontal direction. If it is determined that the pixelin the operation block satisfies the condition concerning the horizontaldirection, the process proceeds to step S520, and increments the numberof effective pixels in the effective pixel counter 413 by one. Theprocess proceeds to step S521.

If, in step S517, it is determined that the pixel in the operation blockdoes not satisfy the condition concerning the horizontal direction, theoperation determining unit 504 proceeds to step S518 and determineswhether the pixel in the operation block satisfies Expression (16),which is the condition concerning the vertical direction. If it isdetermined that the pixel in the operation block satisfies the conditionconcerning the vertical direction, the process proceeds to step S520,and the number of effective pixels in the effective pixel counter 413 isincremented by. The process proceeds to step S521.

If, in step S518, it is determined that the pixel in the operation blockdoes not satisfy the condition concerning the vertical direction, theoperation determining unit 504 proceeds to step S519 and determineswhether the pixel in the operation block satifies Expression (17), whichis the conditions concerning the horizontal and vertical directions(oblique direction). If it is determined that the pixel in the operationblock satifies the conditions concerning the horizontal and verticaldirections, the process proceeds to step S520, and the number ofeffective pixels in the effective pixel counter 413 is incremented byone. The process proceeds to step S521. If, in step S519, it isdetermined that the pixel in the operation block does not satisfy theconditions concerning the horizontal and vertical directions, theprocess proceeds to step S521, skipping over step S520. In other words,it is determined that the pixel in the operation block has no similarityin any of the horizontal, vertical, and horizontal-vertical movements.Accordingly, this pixel is regarded as not effective in the gradientoperation in the subsequent stage.

In step S520, the temporal pixel difference calculating unit 503determines whether processing on all the pixels in the operation blockhas finished. If the temporal pixel difference calculating unit 411 hasdetermined that the processing on all the pixels in the operation blockhas not finished, the process returns to step S512, and selects the nextpixel to repeat the subsequent steps. If, in step S520, the temporalpixel difference calculating unit 411 has determined that the processingon all the pixels in the operation block has finished, the effectivepixel determining process ends before returning to step S404 in FIG. 34.

In the above process, the effective pixel counter 413 has the countednumber of pixels which are each determined to be effective in thegradient operation in the subsequent stage since the pixel satisfies atleast one of a horizontal condition, a vertical condition, and ahorizontal-and-vertical condition. Accordingly, by referring to thenumber of pixels of the effective pixel counter 413 in step S404 in FIG.34, the gradient operation continuation determining unit 414 candetermine whether to perform the block-unit gradient operation orwhether to the pixel-unit gradient operation.

Next, details of the gradient operation process of the gradientoperation unit 404 in FIG. 39 are described below with reference to theflowchart shown in FIG. 44. FIG. 44 shows an example of the block-unitgradient operation process in step S405 in FIG. 34.

When the offset vector is input from the selector 402, in step S551, thetemporal pixel difference calculating unit 523 selects a pixel in theblock-unit operation block and proceeds to step S552. Pixels areselected from the top left end pixel in the operation block in the orderof raster scanning.

In step S522, the time-base pixel difference calculating unit 523calculates time-base pixel difference At in the pixel in the operationblock in either unit processing mode between frame t+1 input through theprefilter 102-1 and frame t input through the prefilter 102-2 by using,as a reference, the pixel calculated by offsetting the offset vector,and outputs the calculated time-base pixel difference Δt to theoperation determining unit 524. The process proceeds to step S553.

When receiving the offset vector selected by the selector 402, in stepS553, the first spatial-gradient-pixel-difference calculating unit 521calculates horizontal pixel difference Δx and vertical pixel differenceΔy of the pixel in the operation block in either unit processing mode inframe t+1 input through the prefilter 102-1 by using, as a reference,the pixel calculated by offsetting the offset vector. The firstspatial-gradient-pixel-difference calculating unit 521 outputs thecalculated horizontal pixel difference Δx and vertical pixel differenceΔy to the operation determining unit 524, and proceeds to step S554.

When receiving the offset vector selected by the selector 402, in stepS554, the second spatial-gradient-pixel-difference calculating unit 522calculates horizontal pixel difference Δx and vertical pixel differenceΔy of the pixel in the operation block in either unit processing mode byusing, as a reference, the pixel in frame t input through the prefilter102-2. The first spatial-gradient-pixel-difference calculating unit 521outputs the calculated horizontal pixel difference Δx and vertical pixeldifference Δy to the operation determining unit 524, and proceeds tostep S555.

In step S555, the operation determining unit 524 performs logicaloperation represented by Expression (18) by using the horizontal pixeldifference Δx and vertical pixel difference Δy (of the pixel in theoperation block) in frame t+1 output from the firstspatial-gradient-pixel-difference calculating unit 521, the horizontalpixel difference Δx and vertical pixel difference Δy (of the pixel inthe operation block) in frame t output from the secondspatial-gradient-pixel-difference calculating unit 522, and thetime-base pixel difference Δt (of the pixel in the operation block)between frame t+1 and frame t. In steps S556 to S558, based on the abovelogical operation, it is determined whether the pixel in the operationblock is effective in motion vector detection.

In other words, in step S555, the operation determining unit 524performs operation represented by Expression (15) which is the conditionconcerning the horizontal direction, operation represented by Expression(16), which is the condition concerning the vertical direction, andoperation represented by Expression (17), which is the conditionsconcerning the horizontal and vertical directions. In step S556, theoperation determining unit 524 determines whether the pixel in theoperation block satisfies Expression (15), which is the conditioconcerning the horizontal direction. If it is determined that the pixelin the operation block satisfies the condition concerning the horizontaldirection, the pixel determined to be effective in motion vectordetection is used as a pixel subject to the gradient operation. Thehorizontal pixel difference Δx, vertical pixel difference Δy, andtime-base pixel difference Δt of the pixel are supplied to the gradientaccumulation unit 424, and the process proceeds to step S559.

If, in step S556, it is determined that the pixel in the operation blockdoes not satisfy the condition concerning the horizontal direction, theoperation determining unit 524 proceeds to step S557 and determineswhether the pixel in the operation block satifies Expression (16), whichis the condition concerning the horizontal direction. If it isdetermined that the pixel in the operation block satisfies the conditionconcerning the vertical direction, the pixel determined to be effectivein motion vector detection, the pixel is used as pixel subject to thegradient operation. The horizontal pixel difference Δx, vertical pixeldifference Δy, and time-base pixel difference Δt of the pixel aresupplied to the gradient accumulation unit 424, and the process proceedsto step S559.

If, in step S557, it is determined that the pixel in the operation blockdoes not satisfy the condition concerning the vertical direction, theoperation determining unit 524 proceeds to step S558 and determineswhether the pixel in the operation block satifies Expression (17), whichis the conditions concerning the horizontal and vertical directions(i.e., the oblique direction). If it is determined that the pixel in theoperation block satifies the conditions concerning the horizontal andvertical directions, the pixel determined to be effective in motionvector detection is used as a pixel subject to the gradient operation.The horizontal pixel difference Δx, vertical pixel difference Δy, andtime-base pixel difference Δt of the pixel are supplied to the gradientaccumulation unit 424, and the process proceeds to step S559. If, instep S558, it is determined that the pixel in the operation block doesnot satisfy the conditions concerning the horizontal and verticaldirections, the process proceeds to step S560, skipping over step S559.In other words, it is determined that the pixel in the operation blockhas no similarity in any of the horizontal movement, the verticalmovement, and the horizontal and vertical movements. This pixel isregarded as not effective in the gradient operation, and is excluded.

The gradient accumulation unit 424 accumulates the time-base pixeldifference Δt calculated in step S559, the horizontal pixel differenceΔx and vertical pixel difference Δy calculated by thehorizontal-and-vertical pixel difference calculating unit 423, andoutputs the accumulated gradient to the vector calculating unit 425. Theprocess proceeds to step S560.

In step S560, the operation determining unit 524 determines whetherprocessing on all the pixels in the operation block has finished. If theoperation determining unit 524 has determined that the processing on allthe pixels in the operation block has not finished, the process returnsto step S551 and repeats the subsequent steps. In addition, if, in stepS560, it is determined that the processing on all the pixels in theoperation block has finished, the operation determining unit 524 outputsthe offset vector to the vector calculating unit 425, and the processproceeds to step S561. When receiving the offset vector from theoperation determining unit 524 in step S561, the vector calculating unit425 calculates motion vector vn by using the gradient accumulationresult from the gradient accumulation unit 424 and the least squaresmethod in Expression (9), and proceeds to step S562. The vectorcalculating unit 425 calculates a motion vector Vn by adding thecalculated motion vector vn to the offset vector from the temporal pixeldifference calculating unit 421, and outputs the calculated motionvector Vn to the vector evaluating unit 104. The gradient operationprocess ends and returns to step S406 in FIG. 34.

As described above, in a case in which, by using time-base pixeldifference Δt, horizontal pixel difference Δx, and vertical pixeldifference Δy to determine that each of gradient similarity concerningthe horizontal direction of pixels in the operation block, gradientsimilarity concerning the vertical direction of pixels in the operationblock, and gradient similarity concerning the horizontal and verticaldirections of pixels in the operation block is less than a predeterminedthreshold value, it is determined that the the any of the gradientsimilarities is less than the predetermined threshold value, that is,less similarity in movement is found, the pixel is excluded from thegradient operation since it is regarded as generating irregularity inmovement. Thus, more stable gradient operation is executed, so that aprobable motion vector is detected, thus improving the accuracy ofmotion vector detection.

As described above, by using, for the gradient operation, only pixelswhich are determined to be effective as the result of determiningwhether movements of the pixels in the operation block are effective inthe gradient operation, and pixels having different movements can beexcluded from a block for which arithmetic operation is to be performed,so that motion vector probability obtained by the gradient operation isimproved, thus improving the accuracy of motion vector detection.

In addition, when the number of pixels, which are not used in thegradient operation is greater than a predetermined threshold value, thegradient operation process is adaptively controlled. Thus, inparticular, in a movement boundary between objects, the accuracy ofmotion vector detection can be improved, so that more probable motionvectors can be obtained.

Although, in the foregoing description, each of the effective pixeldetermining unit 403 and the gradient operation unit 404 includes atime-base pixel difference calculating unit and pixel differencedetermining unit for determining effective pixels, or a firstspatial-gradient-pixel-difference calculating unit, a secondspatial-gradient-pixel-difference calculating unit, a time-base pixeldifference calculating unit 503, and an operation determining unit,these units may be provided in integrated form.

The foregoing description describes the effective pixel determination inthe effective pixel determining unit 403 by using the case ofdetermination by finding a time-base pixel difference in an operationblock, and the case of determination by finding horizontal, vertical,and oblique pixel differences in an operation block. However, anothermethod may be used to determine whether a pixel in the operation blockis effective in the gradient operation.

Next, details of the vector allocating unit 54 are describe below.

FIG. 45 is a block diagram showing the configuration of the vectorallocating unit 54 shown in FIG. 2. In the vector allocating unit 54having the configuration shown in FIG. 45, by using frame t at time tand frame t+1 at time t+1 of the 24 P-signal image, a motion vectordetected in frame t is allocated to an interpolated frame (in theallocated vector memory 55) for interpolation.

In the example shown in FIG. 38, frame t at time t and frame t+1 at timet+1 are input to a pixel information operation unit 701, an evaluatedvalue operation unit 702, and a pixel-of-interest difference operationunit 703.

The pixel information operation unit 701 acquires motion vectorsdetected from pixels in frame t in the detected vector memory 53 fromthe top left end pixel in the order of raster scanning, extends eachacquired motion vector in the direction of frame t+1 at the next time,and calculates a point of intersection between the extended motionvector and the interpolated frame. From the point of intersectionbetween the calculated motion vector and the interpolated frame, thepixel information operation unit 701 sets a pixel (hereinafter alsoreferred to as an “allocation pixel”) to which the motion vector is tobe allocated, and outputs the motion vector and information of theallocation pixel to a vector selecting unit 705. In addition, the pixelinformation operation unit 701 calculates position P in frame t andposition Q in frame t+1 which are associated with the allocation pixelby the motion vector, and outputs the calculated positional informationconcerning frame t and frame t+1 to the evaluated value operation unit702 and the pixel-of-interest difference operation unit 703.

When receiving, from the pixel information operation unit 701, theallocation pixel and the positional information concerning frame t andframe t+1 which are associated by the motion vector, the evaluated valueoperation unit 702 sets a DFD operation range (m by n pixels) aroundposition P and a DFD operation range (m by n pixels) around position Qin order to perform operation to find evaluated values DFD at positionsP and Q in frame t and t+1, and determines whether each DFD operationrange is positioned in the image frame. If it is determined that eachDFD operation range is positioned in the image frame, the evaluatedvalue operation unit 702 finds evaluated value DFD of the allocationpixel for the motion vector by using the DFD operation range to performoperation, and outputs the obtained evaluated value DFD to the vectorevaluating unit 704.

When receiving, from the pixel information operation unit 701, theallocation pixel and the positional information concerning frame t andframe t+1 which are associated by the motion vector, thepixel-of-interest difference operation unit 703 uses position P in framet and position Q in frame t+1 to find the absolute value of luminancedifference for the allocation pixel, and outputs the obtained absolutevalue of luminance difference to the vector evaluating unit 704.

The vector evaluating unit 704 includes a pixel difference determiningunit 711 and an evaluated value determining unit 712. The pixeldifference determining unit 711 determines whether the absolute value ofluminance difference (for the allocation pixel) input from thepixel-of-interest difference operation unit 703 is less than apredetermined threshold value. If the pixel difference determining unit711 has determined that the absolute value of luminance difference (forthe allocation pixel) input from the pixel-of-interest differenceoperation unit 703 is less than the predetermined threshold value, theevaluated value determining unit 712 determines whether the evaluatedvalue DFD (of the allocation pixel) input from the evaluated valueoperation unit 702 is less than a minimum evaluated value in a DFD tablein the vector selecting unit 705. If it is determined that the evaluatedvalue DFD (of the allocation pixel) input from the evaluated valueoperation unit 702 is less than a minimum evaluated value in the DFDtable, the evaluated value determining unit 712 determines that themotion vector corresponding to the allocation pixel is highly reliable,and outputs the evaluated value DFD of the allocation pixel to thevector selecting unit 705.

The vector selecting unit 705 has the DFD table, which stores minimumevaluated values of pixels in the interpolated frame. For each pixel inthe interpolated frame, evaluated value DFD obtained when a zero vectoris allocated is stored beforehand as a minimum evaluated value of eachpixel in the interface in the DFD table. When receiving the evaluatedvalue DFD of the allocation pixel from the vector evaluating unit 704,the vector selecting unit 705 rewrites a flag of the allocation flagmemory 56 into one (true) based on positional information of theallocation pixel, and rewrites the minimum evaluated value for theallocation pixel in the DFD table by the evaluated value DFD of theallocation pixel. In addition, based on the positional information ofthe allocation pixel from the pixel information operation unit 701, thevector selecting unit 705 allocates the motion vector from the pixelinformation operation unit 701 to the allocation pixel in the allocatedvector memory 55.

Next, motion vector accuracy below pixel size is described below. In theDFD evaluation operation represented by Expression (1), it is commonthat phase p+v in frame t+1 obtained by shifting pixel position p inframe t by vector v does not actually coincide with a pixel position inframe t+1 of 24 P signal, and a luminance in such a case is not defined.Accordingly, in order to perform the evaluated value DFD for motionvector v having accuracy below pixel size, a luminance in phase belowpixel size must be generated by some method.

In a method corresponding thereto, the luminance of a pixel having aphase closest to phase p+v in frame t+1 obtained by shifting pixelposition p in frame t by vector v is used in unchanged form. However, inthis method, a component of the evaluated motion vector below pixel sizeis rounded. Thus, it may be said that the component of the evaluatedmotion vector below pixel size is discarded. Thus, the obtainedevaluated value DFD has low reliability.

Accordingly, the present invention uses a four-point interpolationprocess based on the luminances of four peripheral pixels. FIG. 46 is anillustration of the concept of the four-point interpolation process inthe present invention. In FIG. 46, the arrow X indicates the horizontaldirection of frame t+1, and the arrow Y indicates the vertical directionof frame t+1. In frame t+1, the white circles indicate pixel positionsin frame t+1, and the black circles indicate positions below pixel size.The top left end black dot p+v and four peripheral pixels in frame t+1are shown enlarged in window E. In window E, the alphanumerical symbolsin the white circles represent the luminances of the four peripheralpixels.

Assuming that the top left end black dot p+v in frame t+1 is phase p+vof a pixel position obtained by shifting pixel position p in frame t byvector v, the luminance F_(t+1)(p+v) of phase p+v is found by the sum ofthe reciprocal ratios of distances to the four peripheral pixels byusing horizontal component α below pixel size, vertical component βbelow pixel size, and the luminances L0 to L4 of the four peripheralpixels in phase p+v. In other words, luminance F_(t+1)(p+v) isrepresented by the following expression:F _(t+1)(p+v)=(1−α) (1−β)L0+α(1−β)L1+(1−α)βL2+αβL3   (22)

As described above, by performing arithmetic operation for the DFDevaluation by using the luminance F_(t+1)(p+v) obtained in thefour-point interpolation process, the reliability of the evaluated valueDFD can be prevented from decreasing without increasing a hardwareimplementation cost. The following description is directed to an examplein which the four-point interpolation process is applied to arithmeticoperations for values such as the evaluated value DFD and the absolutevalue of luminance difference in vector allocation. Obviously, also inoperation for the above-described initial vector selecting process andvector detecting process, and operation for the evaluated value DFD inthe case of vector evaluation, such as an allocation compensatingprocess (described later), the four-point interpolation process is used.

Next, the concept of the vector allocating process is described below.By way of example, when it is assumed that an object moves at velocity von a 24 P-signal image, and it is assumed that, between two arbitraryframes, uniform velocity assumption holds concerning the movement ofthis object, it is possible that a new frame be interpolated. In thiscase, when motion vector v is extended from the 24 P-signal object, apoint of intersection between motion vector v and the interpolated frameis in the same object and has the same velocity v.

Therefore, by allocating a motion vector in the 24 P-signal frame(hereinafter also referred to as the “original frame” in comparison withthe interpolated frame) detected by the detected vector memory 53 to apoint of intersection between the motion vector and a 60 P-signalinterpolated frame to be interpolated, the movement of each pixel in theinterpolated frame can be found. Conversely, from the allocated motionvector, it can be found from which position a pixel in the interpolatedframe has been moved in the 24 P-signal frame.

FIG. 47 shows, in one-dimensional form, examples of motion vectorsdetected in the 24 P-signal original frame and pixels in theinterpolated frame. In FIG. 47, for example, two interpolated frames,interpolated frame F1 at time t+0.4 and interpolated frame F2 at timet+0.8 are inserted between two frames, 24 P-signal frame t at time t and24 P-signal frame t+1 at time t+1. As described above, the positions ofthese interpolated frames are set beforehand in the signal processingapparatus 1 based on the fact that the 60 P-signal frame is disposed ata position whose time phase on the 24 P signal is 0.0, 0.4, 0.8, 1.2,and 1.6.

The circles in each frame indicate pixels. The motion vectors v1, v2,and v3 detected in frame t by the vector detecting unit 52 in theprevious stage are extended in the direction of frame t+1. When thesemotion vectors are allocated to the pixels in interpolated frames F1 andF2, a motion vector passing in the vicinity of each pixel in eachinterpolated frame serves as a candidate vector (hereinafter alsoreferred to as an “allocation candidate vector”) allocated to the pixel.

Therefore, motion vector v1, directed from the left end pixel in frame tto the vicinity of the fourth and fifth pixels from the left in framet+1, passes between the second and third pixels from the left ininterpolated frame F1, and passes between the third and fourth pixelsfrom the left in interpolated frame F2. Hence, motion vector v1 servesas an allocation candidate vector to be allocated to pixels (the secondand third pixels from the left in interpolated frame F1 and the thirdand fourth pixels from the left in interpolated frame F2) included inneighborhood N1 of points at which motion vector v1 intersects withinterpolated frames F1 and F2.

Motion vector v2, directed from the third pixel from the left in frame tto a neighborhood of the second and third pixels, passes between thesecond and third pixels from the left interpolated frame F1, and passesbetween the second and third pixels from the left interpolated frame F2.Therefore, vector V2 serves as an allocation candidate vector to beallocated to pixels (the second and third pixels from the left ininterpolated frame F1 and the second and third pixels from the left ininterpolated frame F2) included in neighborhood N2 of points at whichvector V2 intersects with interpolated frames F1 and F2.

Motion vector v3, directed from the fifth pixel from the left in frame tto a neighborhood of the fourth and fifth pixels from the left in framet+1, passes between the fourth and fifth pixels from the left ininterpolated frame F1, and passes between the fourth and fifth pixelsfrom the left interpolated frame F2. Accordingly, motion vector V3serves as an allocation candidate vector to be allocated to pixels (thefourth and fifth pixels from the left interpolated frame F1 and thefourth and fifth pixels from the left in interpolated frame F2) includedin neighborhood N3 at which motion vector V3 intersects withinterpolated frames F1 and F2.

In other words, an allocation candidate vector for the second pixel fromthe left interpolated frame F2 is vector V2, and Allocation candidatevectors for the second and third pixels from the left interpolated frameF1 and the third pixel from the left in interpolated frame F2 are motionvectors v1 and v2. Allocation candidate vectors for the fourth pixelfrom the left interpolated frame F2 are motion vectors v1 and v3, and Anallocation candidate vector for the fourth and fifth pixels from theleft in interpolated frame F1 and the fifth pixel from the left ininterpolated frame F2 is motion vector V3.

As described above, from among motion vectors detected in the originalframe, allocation candidate vectors to be allocated to pixels ininterpolated frames are found. Regarding the left end pixels and theright end pixels in interpolated frames F1 and F2, vectors passing inneighborhoods are not shown. In other words, the left end pixels and theright end pixels in interpolated frames F1 and F2 have no allocationcandidate vectors to be allocated. Therefore, for these pixels, theallocation compensating process is executed by the allocationcompensating unit 57 in the subsequent stage, which is described later.

A motion vector detected in the original frame and pixels in a 60P-signal interpolated frame are described in detail with reference toFIG. 48. In the example shown in FIG. 41, the arrow T indicates adirection of lapse of time from frame t at time t, which is positionedon the left side of the foreground in FIG. 41, to frame t+1 at time t+1,which is positioned on the right side of the background in FIG. 41.Interpolated frame F1 is disposed at time t+pos_(t) between time t andtime t+1.

In the case shown in FIG. 48, motion vector v_(a)(x_(va), y_(va))detected at pixel (x_(a), y_(a)) in frame t is extended in the directionof frame t+1, and point (x_(ia), y_(ia)) of intersection between theextended motion vector and interpolated frame F1 is calculated. Thepoint of intersection is a point obtained such that a pixel at an endpoint of motion vector v_(a) in 24 P-signal frame t is moved. Thus, thepoint of intersection is represented by the following expressions:x _(ia) =x _(a)+pos_(t) x _(va)   (23)y _(ia) =y _(a)+pos_(t) y _(va)   (24)

As described above, when motion vector v_(a) has accuracy below pixelsize, the point of intersection of motion vector v_(a) does not alwayscoincide with the pixel position in interpolated frame F1. When both donot coincide with each other, as shown in FIG. 48, motion vector v_(a)is allocated to four pixels G1 to G4 in a neighborhood of the point ofintersection in interpolated frame F1. In other words, motion vectorv_(a) is shifted (translated) to pixels G1 to G4 in the neighborhood andare used as and allocation candidate vector to be allocated to eachpixel. After that, the allocation compensating process is executed.

In such a case, one motion vector may be used as a candidate vector tobe allocated to four pixels in the neighborhood. Thus, plural motionvectors are used as allocation candidate vectors depending on pixels. Inthis case, by calculating a point of intersection in the original framefor each motion vector between a pixel in the interpolated frame and aposition in the original frame which is associated by the motion vector,and using the point of intersection, the vector allocating unit 54finally determines a motion vector to be allocated to a pixel in theinterpolated frame.

Motion vector evaluation by the vector allocating unit 54 is describedwith reference to FIG. 49. FIG. 49 shows, in one-dimensional form fromthe bottom, frame t at time t, interpolated frame F1 at time t+pos_(t),and frame t+1 at time t+1, which are shown in FIG. 41.

In the example shown in FIG. 49, motion vector sv_(a) is obtained suchthat motion vector v_(a) detected in pixel (x_(a), y_(a)) in frame t isshifted (translated) as an allocation candidate vector for neighboringpixel G4 to pixel G4. In FIG. 42, points of intersection of motionvector sv_(a) (obtained such that motion vector v_(a) detected in pixel(x, y_(a)) in frame t is shifted) with frame t and frame t+1 areindicated by reference letters P and Q, respectively.

In first evaluation, the vector allocating unit 54 firstly finds DFDoperation ranges around points P and Q, and determines whether theobtained the DFD operation ranges exceed the image frame. Accordingly,if the obtained the DFD operation ranges around points P and Q exceedthe image frame, motion vector sva is excluded from candidate vectors.

In addition, when points P and Q belong to different objects, theluminance F_(t)(P) of point P and the luminance F_(t+1)(Q) of point Qhave a large difference. Accordingly, in second evaluation of motionvector sv_(a), the vector allocating unit 54 finds the absolute value dpof luminance difference at pixel G4 by using points P and Q, anddetermines whether the absolute value dp of luminance difference isgreater than a predetermined value. If it is determined that theabsolute value dp of luminance difference is greater than thepredetermined value, it is determined that motion vector sv_(a) at pixelG4 has low reliability, and motion vector sv_(a) is excluded fromcandidate vectors. The absolute value dp of luminance difference isrepresented by the following expression:dp=|F _(t)(P)−F _(t+1)(Q)|  (25)

In third evaluation, the vector allocating unit 54 performs evaluationbased on the absolute value of difference representing a correlationvalue on the DFD operation ranges around points P and Q. In other words,the vector allocating unit 54 finds an evaluated value DFD of motionvector sv_(a) at pixel G4 by using the DFD operation ranges aroundpixels P and Q, and determines whether the obtained evaluated value DFDis less than the minimum evaluated value in the evaluated value DFDtable. The vector allocating unit 54 allocates, to pixel G4, a motionvector detected by the above evaluation, whose evaluated value DFD isthe minimum, among the obtained evaluated values DFD.

As described above, a motion vector as an allocation candidate vector ata pixel in an interpolated frame is evaluated by using not only anevaluated value DFD of an allocation pixel which is subject toallocation, but also the absolute value of luminance difference at theallocation pixel. Thus, a probable motion vector can be allocated to theallocation vector compared with the case of the related art of onlyusing the evaluated value DFD. This results in improvement in accuracyof vector allocation.

As described above, in order to evaluate a motion vector as anallocation candidate vector at a pixel in an interpolated frame, aposition in the original frame which is associated by the motion vectoris used, with a pixel in the interpolated frame used as a reference.However, when finding the absolute value dp of luminance difference andevaluated value DFD, a point of intersection between the motion vectorand the original frame may not coincide with the pixel position in theoriginal frame because the motion vector as an allocation candidatevector is extended with the pixel position as a reference. Thus, it isimpossible to find the pixel value if this state remains unchanged. Inthis case, the four-point interpolation process described with referenceto FIG. 46 is executed.

FIG. 50 shows an example of four-point interpolation in the vectorallocating process. In FIG. 50, portions corresponding to those shown inFIGS. 48 and 49 are denoted by corresponding reference symbols, and arepeated description of the corresponding portions is omitted.

In the example shown in FIG. 50, motion vector sv_(a) is extended, withpixel position G4 in interpolated frame F1 used as a reference. Thus,point P of intersection between motion vector sv_(a) and frame t doesnot coincide with a pixel position (while circle) in frame t, and, inaddition, point Q of intersection between motion vector sva and framet+1 does not coincide with a pixel position (white circle) in frame t+1.Therefore, in frame t and frame t+1, by using four pixels (the whitecircles in frame t and frame t+1) in each of neighborhoods around pointsP and Q of intersection, the above-described four-point interpolationoperation is performed to find pixel values at points P and Q ofintersection.

Since, as described above, in the vector allocating process of thepresent invention, pixel values at points P and Q of intersectionobtained by the four-point interpolation process are used to calculatethe absolute value dp of luminance difference and evaluated value DFD,the absolute value dp of luminance difference and evaluated value DFDcan be found with accuracy higher than that in the method of the relatedart that rounds components below pixel size.

Next, details of the vector allocating process are described below withreference to the flowchart shown in FIG. 51. Frame t at time t, which isthe 24 P-signal original frame, and frame t+1 at time t+1 are input tothe pixel information operation unit 701, the evaluated value operationunit 702, and the pixel-of-interest difference operation unit 703.

When receiving the original frame, in step S701, the pixel informationoperation unit 701 controls the vector selecting unit 705 to initializethe allocation flag in the allocation flag memory 56 into zero (false),and proceeds to step S702. In step S702, the pixel information operationunit 701 controls the vector selecting unit 705 to initialize theallocation flag in the allocated vector memory 55 into a zero vector,and proceeds to step S703. As a result, a zero vector is allocated to apixel having no motion vector allocated.

In step S703, the pixel information operation unit 701 controls theevaluated value operation unit 702 to calculate evaluated value DFDO foreach of all pixels in the interpolated frame by using the zero vector,and controls the vector selecting unit 705 to store, in the DFD table,the calculated evaluated value DFDO for the zero vector as a minimumevaluated value for each pixel in the interpolated frame. The processproceeds to step S704. In other words, in step S703, the evaluated valueoperation unit 702 uses the zero vector to calculate evaluated valueDFD0 for all the pixels in the interpolated frame, and outputs thecalculated evaluated value DFDO to the vector selecting unit 705 throughthe vector evaluating unit 704. The vector selecting unit 705 stores theevaluated value DFD0 input through the vector evaluating unit 704 as theminimum evaluated value of a corresponding pixel in the DFD table.

In step S704, the pixel information operation unit 701 selects a pixelfrom the original frame in the detected vector memory 53, and proceedsto step S705. In this case, pixels are selected from the left end pixelin the order of raster scanning.

In step S705, the pixel information operation unit 701 performs a pixelposition operation process, and proceeds to step S706. Details of thepixel position operation process are described with reference to FIG.52. In this pixel position operation process, an allocation pixel in theinterpolated frame to which the motion vector detected at the pixelselected in step S704 is calculated, and a pixel position in theoriginal frame which is associated by the motion vector is calculated,with the calculated allocation pixel used as a reference.

In step S706, the pixel information operation unit 701 selects thecalculated allocation pixel, and outputs the selected allocation pixeland its motion vector to the vector selecting unit 705 before proceedingto step S707. At the same time, the pixel information operation unit 701outputs, to the evaluated value operation unit 702 and thepixel-of-interest difference operation unit 703, information of thepixel position in the original frame which is associated by the motionvector. In step S706, when plural allocation pixels exist, the pixelinformation operation unit 701 selects the pixels from the left endpixel.

In step S707, the pixel information operation unit 701 executes anallocated vector evaluating process and proceeds to step S708. Detailsof the allocated vector evaluating process are described later withreference to FIG. 53. In the allocated vector evaluating process,evaluated value DFD of the motion vector and the absolute value ofluminance difference at the allocation pixel are found, and thereliability of the motion vector at the allocation pixel is determined.After the determination, the motion vector in the allocated vectormemory 55 is rewritten by a motion vector that is determined to behighly reliable.

In step S708, the pixel information operation unit 701 determineswhether processing on all the allocation pixels has finished. If it isdetermined that the processing on all the allocation pixels has notfinished, the pixel information operation unit 701 returns to step S706,selects the next allocation pixel, and repeats the subsequent steps.

If, in step S708, it is determined that the processing on all theallocation pixels has finished, in step S709, the pixel informationoperation unit 701 determines whether processing on all the pixels inthe original frame in the detected vector memory 53 has finished. If, instep S709, it is determined that the processing on all the pixels in theoriginal frame in the detected vector memory 53 has not finished, thepixel information operation unit 701 returns to step S704 and selectsthe next pixel to repeat the subsequent steps. If, in step S709, it isdetermined that the processing on all the pixels in the original framein the detected vector memory 53 has finished, the pixel informationoperation unit 701 finishes the vector allocating process.

Next, details of the pixel position operation process are describedbelow with reference to the flowchart shown in FIG. 52. FIG. 52 shows anexample of the pixel position operation process in step S705 in FIG. 51.

In step S721, the pixel information operation unit 701 acquires, fromthe detected vector memory 53, the motion vector detected at the pixelselected in step S704, and proceeds to step S722. Since the motionvector of the selected pixel is a zero vector, a zero vector is storedas an initial value beforehand in the allocated vector memory 55, thesubsequent steps S722 to S724, and the steps S706 to S708 of FIG. 51 areskipped over, and the process proceeds to step S709.

In step S722, the pixel information operation unit 701 calculates apoint of intersection between the acquired motion vector and theinterpolated frame. Specifically, the pixel information operation unit701 extends the acquired motion vector in the direction of the nextframe t+1, calculates a point of intersection between the extendedmotion vector and the interpolated frame, and proceeds to step S723.

In step S723, the pixel information operation unit 701 sets anallocation pixel from the point of intersection calculated based on themotion vector and the interpolated frame, and proceeds to step S724.When the point of intersection coincides with the pixel position in theinterpolated frame, the pixel information operation unit 701 sets thepoint of intersection as the allocation pixel. Alternatively, when thepoint of intersection does not coincide with the pixel position in theinterpolated frame, four pixels in a neighborhood of the point ofintersection in the interpolated frame are set as allocation pixels bythe pixel information operation unit 701, as described above.

In step S724, by using each allocation pixel as a reference, the pixelinformation operation unit 701 calculates a pixel position in theoriginal frame which is associated by the acquired motion vector. Thepixel position is required for the evaluated value operation unit 702and the pixel-of-interest difference operation unit 703 to findevaluated value DFD and the absolute value of luminance difference.Specifically, in step S724, the pixel information operation unit 701shift (translates) the acquired motion vector to the set allocationpixel, finds the position of the point of intersection between theshifted motion vector and the position in the original frame, andfinishes the pixel position operation process. The process returns tostep S706 in FIG. 50.

Next, details of the allocated vector evaluating process are describedbelow with reference to the flowchart shown in FIG. 53. FIG. 53 shows anexample of the allocated vector evaluating process in step S707 in FIG.51.

In step S706 in FIG. 51, by using the selected allocation pixel as areference, the pixel position in the original frame which is associatedby its motion vector is found by the pixel information operation unit701. Information of the position in the original frame is input to theevaluated value operation unit 702 and the pixel-of-interest differenceoperation unit 703.

When receiving the information of the position in the original framefrom the pixel information operation unit 701, in step S741, in order tofind evaluated value DFD of the motion vector at the allocation pixel,the evaluated value operation unit 702 finds DFD operation ranges (m byn pixels) around frame t and frame t+1, and proceeds to step S742. Instep S742, the evaluated value operation unit 702 determines substratethe obtained DFD operation ranges are in the image frame. If, in stepS742, it is determined that the DFD operation ranges exceed the imageframe, the evaluated value operation unit 702 determines that the motionvector does not serve as an allocation candidate vector to be allocatedto an allocation pixel. Accordingly, steps S743 to S749 are skippedover, and the allocated vector evaluating process is finished beforereturning to step S708 in FIG. 51.

If, in step S742, it is determined that each obtained DFD operationrange is in the image frame, the evaluated value operation unit 702proceeds to step S743. In step S743, by using the DFD operation rangedetermined to be in the image frame, the evaluated value operation unit702 performs operation to find the evaluated value DFD of the allocationpixel, and outputs the obtained evaluated value DFD to the evaluatedvalue determining unit 712 before proceeding to step S744. If, at thistime, the position in the original frame is a position other than pixelposition, by using the above-described four-point interpolation processto find the luminance of the point of intersection in the originalframe, the evaluated value DFD of the allocation pixel is obtained.

When receiving the position in the original frame from the pixelinformation operation unit 701, in step S744, the pixel-of-interestdifference operation unit 703 finds the absolute value dp of luminancedifference at the allocation pixel, and outputs the obtained absolutevalue dp of luminance difference to the pixel difference determiningunit 711. The process proceeds to step S745. Also in this case, when theposition in the original frame is a position other than pixel position,by using the above-described four-point interpolation process to findthe luminance of the point of intersection in the original frame, thepixel-of-interest difference operation unit 703 calculates the absolutevalue dp of luminance difference at the allocation pixel.

If, in step S745, the pixel difference determining unit 711 determineswhether the absolute value dp of luminance difference of the allocationpixel from the pixel-of-interest difference operation unit 703 is equalto or less than a predetermined threshold value. If it is determinedthat the absolute value dp of luminance difference of the allocationpixel is equal to or less than the predetermined threshold value, thepixel difference determining unit 711 determines that points ofintersection in frame t and frame t+1 are likely to respectively belongto different objects, that is, the pixel difference determining unit 711determines that the motion vector has low reliability at the allocationpixel and does not serve as an allocation candidate vector forallocation to the allocation pixel. Accordingly, steps S746 to S749 areskipped over, and the allocated vector evaluating process is finishedbefore returning to step S708 in FIG. 51.

If, in step S745, the pixel difference determining unit 711 hasdetermined that the absolute value dp of luminance difference is lessthan the predetermined threshold value, the process proceeds to stepS746. In step S746, by referring to the DFD table in the vectorselecting unit 705, the evaluated value determining unit 712 determineswhether the evaluated value DFD from the evaluated value operation unit702 is less than the minimum evaluated value (the evaluated value DFDOfor the zero vector) of the allocation pixel stored in the DFD table. Ifit is determined that the evaluated value DFD of the allocation pixelfrom the evaluated value operation unit 702 is equal to or greater thanthe minimum evaluated value of the allocation pixel stored in the DFDtable, the evaluated value determining unit 712 determines that themotion vector has low reliability at the allocation pixel. Accordingly,steps S747 to S749 are skipped over, and the allocated vector evaluatingprocess is finished before returning to step S708 in FIG. 51.

Alternatively, if, in step S746, it is determined that the evaluatedvalue DFD of the allocation pixel from the evaluated value operationunit 702 is less than the minimum evaluated value of the allocationpixel stored in the DFD table, the evaluated value determining unit 712determines that, among motion vectors that have been compared, themotion vector has the highest reliability based on the evaluated valueDFD, and outputs, to the vector selecting unit 705, the evaluated valueDFD of the allocation pixel determined to have the highest reliability.The process proceeds to step S747.

When receiving the evaluated value DFD of the allocation pixel from theevaluated value determining unit 712, in step S747, the vector selectingunit 705 rewrites the allocation flag for the allocation pixel in theallocation flag memory 56 into one (true), and proceeds to step S748. Instep S748, the vector selecting unit 705 rewrites the minimum evaluatedvalue, to which the allocation pixel in the DFD table corresponds, intothe evaluated value DFD determined to have the highest reliability, andproceeds to step S749.

The selected allocation pixel and its motion vector are input from thepixel information operation unit 701 to the vector selecting unit 705 instep S706. Therefore, in step S749, the vector selecting unit 705rewrites the motion vector allocated to the allocation pixel in theallocated vector memory 55 by a motion vector corresponding to theevaluated value DFD determined to have the highest reliability, andfinishes the allocated vector evaluating process before returning tostep S708 in FIG. 51.

As described above, when a motion vector to be allocated to anallocation pixel in an interpolated frame is selected, not onlyevaluated value DFD, but also the absolute value of luminance differenceof the allocation pixel, which is obtained based on a position in theoriginal frame associated by a motion vector, are separately treated andevaluated. Thus, compared with the case of the related art of only usingevaluated value DFD, from among allocation candidate vectors, a mostprobable motion vector is selected and allocated to the allocationpixel. This improves vector allocating accuracy, thus suppressing imagediscontinuity, etc., generated in an image interpolating process in thesubsequent stage, so that image quality can be improved.

In addition, since, in the case of finding evaluated value DFD and theabsolute value of luminance difference, when requiring a pixel value ata position other than pixel position, the pixel value is calculated bylinear interpolation based on distances to four pixels in a neighborhoodof the position, processing with accuracy for the position can beperformed. Moreover, compared with the method of the related art thatrounds components of positions other pixel position, the absolute valuedp of luminance difference and evaluated value DFD can be found withhigher accuracy. This makes it possible to allocate, among allocationcandidate vectors, a most probable motion vector to a pixel of interest.In other words, the accuracy of the vector allocating process isimproved.

In addition, after the evaluated value DFD based on a zero vector isstored as an initial value beforehand, while motion vectors aresequentially being processed, when evaluated value DFD based on a motionvector serves as the minimum evaluated value at that time, the minimumevaluated value in the DFD table and the motion vectors allocated in theallocated vector memory 55 are updated as required. Thus, time andresources can be efficiently used.

Next, details of the configuration of the allocation compensating unit57 are described below.

FIG. 54 is a block diagram showing the configuration of the allocationcompensating unit 57. The allocation compensating unit 57, whoseconfiguration is shown in FIG. 54, includes an allocated vectordetermining unit 801 and a vector compensating unit 802. The allocationcompensating unit 57 allocates, to a pixel in the 60 P-signalinterpolated frame to which no motion vector is allocated by the vectorallocating unit 54, the motion vector of a peripheral pixel around thepixel.

The motion vector is allocated to a pixel in the interpolated frame inthe allocated vector memory 55 by the vector allocating unit 54. Inaddition, one (true) is written in the allocation flag in the allocationflag memory 56 for the pixel to which a motion vector is allocated bythe vector allocating unit 54, and zero (false) is written in theallocation flag in the allocation flag memory 56 for the pixel to whichno motion vector is allocated.

By referring to the allocation flag in the allocation flag memory 56,the allocated vector determining unit 801 determines whether a motionvector is allocated to a pixel of interest by the vector allocating unit54. The allocated vector determining unit 801 selects a pixel ofinterest to which no motion vector is allocated by the vector allocatingunit 54, and controls, for the selected pixel of interest, the vectorcompensating unit 802 to select and allocate the motion vectors ofperipheral pixels to the interpolated frame in the allocated vectormemory 55.

The vector compensating unit 802 acquires, from the allocated vectormemory 55, the motion vectors allocated to the peripheral pixel aroundthe pixel of interest. By using the input frame t at time t and theinput frame t+1 at time t+1 to find evaluated values DFD of the acquiredmotion vectors, and comparing the obtained evaluated values DFD, thevector compensating unit 802 allocates, to the pixel of interest in theallocated vector memory 55, a motion vector having the highestreliability based on the evaluated value DFD among the motion vectorsallocated to the peripheral pixels around the pixel of interest. Inaddition, the vector compensating unit 802 uses one (true) to rewritethe allocation flag for the pixel of interest to which the motion vectoris allocated.

FIG. 55 is a block diagram showing the configuration of the vectorcompensating unit 802. The vector compensating unit 802 shown in FIG. 55includes a compensation unit 811 and an evaluated value operation unit812.

The compensation unit 811 includes a memory 821 for storing the minimumevaluated value DFD and the motion vector for the minimum evaluatedvalue DFD as candidate vectors (hereinafter also referred to as“compensating candidate vectors”). The memory 821 stores an evaluatedvalue DFD of a zero vector as the minimum evaluated value and as theinitial value of the selected pixel of interest selected by theallocated vector determining unit 801, and stores the zero vector as acompensating candidate vector. By referring to the allocation flagmemory 56, the compensation unit 811 determines whether there are themotion vectors of peripheral pixels around the pixel of interest,acquires the motion vectors allocated to the peripheral pixels from theallocated vector memory 55, and controls the evaluated value operationunit 812 to calculate evaluated values DFD of the motion vectors.

The compensation unit 811 determines whether each evaluated value DFDcalculated by the evaluated value operation unit 812 is less than theminimum evaluated value. If it is determined that the calculatedevaluated value DFD is less than the minimum evaluated value, thecompensation unit 811 rewrites the compensating candidate vector andminimum evaluated value stored in the memory 821 by the calculatedevaluated value DFD and is motion vector. Finally, the motion vector(compensating candidate vector) of the peripheral pixel determined tohave the least evaluated value DFD is allocated as the motion vector ofa pixel of interest to the pixel of interest in the allocated vectormemory 55. The compensation unit 811 uses one (true) to rewrite theallocation flag in the allocation flag memory 56 for the pixel ofinterest to which the motion vector is allocated.

After acquiring the motion vectors of the peripheral pixels from theallocated vector memory 55, the evaluated value operation unit 812calculates the evaluated values DFD of the motion vectors from theallocated vector memory 55 by using frame t (at time t) and frame t+1(at time t+1) of the input 24 P-signal image, and outputs the calculatedevaluated values DFD to the compensation unit 811.

FIG. 56 is an illustration of the principle of the allocationcompensating process. In the example shown in FIG. 56, pixels in theinterpolated frame are shown. The arrows extending from the pixelsindicate motion vectors allocated to the pixels. The pixels having noarrows indicate pixels to which no motion vectors are allocated.

From among the motion vectors allocated to the peripheral pixels in aneighborhood of pixel P of interest, a motion vector having the highestreliability based on the evaluated value DFD is selected and allocatedto the center pixel P of interest to which no motion vector is allocatedby the vector allocating unit 54. In the example shown in FIG. 56, themotion vector (indicated by the thick arrow) of the pixel is selectedand allocated to pixel P of interest. This is a process that is executedbased on movement correlation, which is described below.

FIG. 57 is an illustration of the principle of movement correlation. Inthe example shown in FIG. 57, object O1 moves with movement v1 in aframe, and object O2 moves with movement v2 in a frame. Pixel P1 ofinterest and its neighborhood K1 which belong to object O1 have movementv1 substantially identical to that of object O1. In addition, pixel P2of interest and its neighborhood K2 which belong to object O2 havemovement v2 substantially identical to that of object O2.

As described above, movement correlation represents the fact that, inmany cases, in a space (the same frame) in the same single time, themovements of pixels belonging to an object are substantially identical.Therefore, for a pixel to which a motion vector fails to be allocated,by using the existence of such movement correlation in the space (thesame frame) in the same time, a motion vector corresponding to the pixelis selected from among the motion vectors of peripheral pixels. Thisalso applies to temporal correlation although its description isomitted.

Next, a motion vector compensating process that is executed based onmovement correlation is described below with reference to FIGS. 58 to64. Specifically, in the motion vector compensating process, from themotion vectors of peripheral pixels, a motion vector is selected andused for compensation as the motion vector of a pixel of interest. Inthe example shown in FIG. 58, the white circles indicate pixels in aninterpolated frame. Eight peripheral pixels are shown around pixel P ofinterest whose motion vector is to be found. The motion vector of pixelP of interest is found by referring to the motion vectors of the eightperipheral pixels.

In the example shown in FIG. 59, among eight peripheral pixels aroundpixel P of interest, the top left, top right, and bottom right pixels(indicated by the block circles) have motion vectors (indicated by thearrows) obtained by processing in the previous stage (e.g., theabove-described vector allocating process). In other words, in thiscase, the top left, top right, and bottom right pixels serve ascompensating candidate vectors for pixel P of interest. Since, in aframe, motion vectors are found from the top left end pixel in the framein the order of raster scanning, there is a possibility that, among theeight peripheral pixels, pixels whose motion vectors are not found mayexist. Such motion vectors cannot be used as compensating candidatevectors.

As indicated by the example shown in FIG. 60, among the eight peripheralpixels, in addition to the pixels (black circles) having the motionvectors found by the processing in the previous stage, pixels (indicatedby the hatched circles) having motion vectors found by this process alsoexist. In other words, in this process, results obtained by this processin the previous stage are also used. Accordingly, in the example shownin FIG. 60, compensating candidate vectors for pixel P of interest arecomposed of the motion vectors of the pixels (black circles), whosemotion vectors have already existed, and the motion vectors of thepixels (the hatched circles), which have the motion vectors found bythis process in the previous stage.

In addition, as indicated by the example shown in FIG. 61, zero vectorS0 (stationary vector) in which the amount of movement is zero can bealso used as a compensating candidate vector. In the example shown inFIG. 60, the pixels which have the motion vectors found by this processand the pixels whose motion vectors have already existed are separatelyshown. However, both are identical in having motion vectors.Accordingly, in FIGS. 61 to 64, it is deemed that also the pixels havingthe motion vectors found by this process are included in the pixels(black circles) whose motion vectors have already existed. Therefore, inthe example shown in FIG. 61, the compensating candidate vectors forpixel P of interest are composed of the pixels (black circles) whosemotion vectors have already existed and zero vector S0.

In order to compare the reliabilities (probabilities) of thecompensating candidate vectors formed as described above, evaluatedvalue DFD for motion vector evaluation is found as shown in FIGS. 62 to64. FIG. 62 shows that zero vector S0 is used as a compensatingcandidate vector. FIG. 63 shows that the top left pixel VK1 among eightperipheral pixels is used as a compensating candidate vector. FIG. 64shows that the top center pixel VK2 among eight peripheral pixels isused as a compensating candidate vector.

In the example shown in FIG. 62, from the compensating candidate vectorsfor pixel P of interest, which are shown on the left side of FIG. 62,zero vector S0 is selected and evaluated value DFD of the selected zerovector S0 is found. In other words, evaluated value DFD of zero vectorS0 is found such that, in frame t and frame t+1 of the 24 P-signal imagewith pixel P of interest (60 P-signal interpolated frame) providedtherebetween, by using pixel P of interest in the interpolated frame, apoint of intersection with which the selected zero vector S0 isassociated is found, DFD operation ranges D1-1 and D1-2 formed bypredetermined m-by-n-pixel ranges are calculated with the point ofintersection as the center, and the calculated DFD operation ranges D1-1and D1-2 are used to perform operation based on Expression (1).

In the example shown in FIG. 63, from compensating candidate vectors forpixel P of interest, shown on the left side of FIG. 63, the motionvector VK1 of the top left pixel of the eight peripheral pixels isselected, and evaluated value DFD of the motion vector VK1 selected. Inother words, evaluated value DFD of the motion vector VK1 of the topleft pixel of the eight peripheral pixels is found such that, in frame tand frame t+1 with pixel P of interest (in the interpolated frame)provided therebetween, by using pixel P of interest as a reference, apoint of intersection with which the selected motion vector VK1 isassociated is found, DFD operation ranges D2-1 and D2-2 formed bypredetermined m-by-n-pixel ranges are calculated with the point ofintersection as the center, and the calculated DFD operation ranges D2-1and D2-2 are used to perform operation based on Expression (1).

In the example shown in FIG. 64, from compensating candidate vectors forpixel P of interest, shown on the left side of FIG. 64, the motionvector VK2 of the top center pixel of the eight peripheral pixels isselected, and evaluated value DFD of the motion vector VK2 selected. Inother words, evaluated value DFD of the motion vector VK2 of the topcenter pixel of the peripheral pixels is found such that, in frame t andframe t+1 with pixel P of interest (in the interpolated frame) providedtherebetween, by using pixel P of interest as a reference, a point ofintersection with which the selected motion vector VK2 is associated isfound, DFD operation ranges D3-1 and D3-2 formed by predeterminedm-by-n-pixel ranges are calculated with the point of intersection as thecenter, and the calculated DFD operation ranges D3-1 and D3-2 are usedto perform operation based on Expression (1).

For the other compensating candidate vectors shown on the left side ofFIG. 64, basically identical processing is performed. Accordingly, itsdescription is omitted. As described above, evaluated values DFD of allthe compensating candidate vectors for the peripheral pixels aroundpixel P of interest are found, the obtained evaluated values DFD arecompared with one another, and among the obtained evaluated values DFD,a compensating candidate vector having the minimum evaluated value DFDis selected as a probable motion vector having the highest reliabilitywhich is to be allocated to the pixel P of interest.

In the example shown in FIG. 65, it is determined that, from amongcompensating candidate vectors of peripheral pixels for pixel P ofinterest, evaluated value DFD for the motion vector VK1 of the top leftpixel of the eight peripheral pixels is the least, and motion vector VK1is allocated to the motion vector of pixel P of interest.

As described above, the motion vector of a pixel to which a motionvector cannot be allocated by the vector allocating unit 54 iscompensated from the motion vectors of peripheral pixels by usingmovement correlation. Thus, irregularity in movement can be suppressedcompared with a case in which no motion vector is allocated, forexample, a case in which a zero vector is allocated. In addition, themotion vector of the pixel compensated in this manner can be also usedagain as a compensating candidate vector for another pixel. In otherwords, not only motion vectors in a spatial neighborhood, but alsomotion vectors in a temporal neighborhood can be used as compensatingcandidate vectors. For pixels that substantially identically move in anobject, vectors having substantially identical movements are selected,so that stable motion vectors having reduced errors can be obtained.This improves the accuracy of vector allocation.

Next, details of the allocation compensating process are described belowwith reference to the flowchart shown in FIG. 66.

A motion vector is allocated to a pixel in the interpolated frame in theallocated vector memory 55 by the vector allocating unit 54 in theprevious stage. In the allocation flag in the allocation flag memory 56for each pixel to which a motion vector is allocated by the vectorallocating unit 54, one (true) is written. In the allocation flag in theallocation flag memory 56 for each pixel to which no motion vector isallocated, zero (false) is written.

In step S801, the allocated vector determining unit 801 selects a pixelin the interpolated frame in the allocation flag memory 56 as a pixel ofinterest, and proceeds to step S802. The allocated vector determiningunit 801 selects pixels from the top left end pixel in the order ofraster scanning.

In step S802, the allocated vector determining unit 801 determineswhether the allocation flag in the allocation flag memory 56 for thepixel of interest is zero (false). If it is determined that theallocation flag in the allocation flag memory 56 for the pixel ofinterest is zero (false), the allocated vector determining unit 801determines that no motion vector is allocated. Proceeding to step S803,the allocated vector determining unit 801 controls the compensation unit811 to execute the vector compensating process, and proceeds to stepS804. Details of the vector compensating process are described laterwith reference to FIG. 67. In the vector compensating process, from themotion vectors allocated to peripheral pixels, a motion vector havingthe minimum evaluated value DFD is stored as a compensating candidatevector in the memory 821.

In step S804, the compensation unit 811 allocates the compensatingcandidate vector in the memory 821 as the motion vector of the pixel ofinterest to the allocated vector memory 55, and proceeds to step S805.The compensation unit 811 rewrites the allocation flag for the pixel ofinterest in the allocation flag memory 56, and the process proceeds tostep S806.

If, in step S802, it is determined that the allocation flag in theallocation flag memory 56 for the pixel of interest is one (true), theallocated vector determining unit 801 determines that a motion vectorhas been allocated to the pixel of interest, and proceeds to step S806,skipping over steps S803 to S805.

In step S806, the allocated vector determining unit 801 determineswhether processing on all the pixels in the interpolated frame in theallocation flag memory 56 has finished. If it is determined that theprocessing on all the pixels has not finished, the process returns tostep S801, and selects the next pixel in the interpolated frame in theallocation flag memory 56. The subsequent steps are executed. If, instep S806, it is determined that the processing on all the pixels in theinterpolated frame in the allocation flag memory 56 has finished, theallocation compensating process ends.

Next, details of the vector compensating process are described belowwith reference to the flowchart shown in FIG. 67. FIG. 67 shows anexample of the vector compensating process in step S803 in FIG. 66.

In step S821, the compensation unit 811 controls the evaluated valueoperation unit 812 to calculate evaluated value DFDO by using a zerovector, and the process proceeds to step S822. Specifically, in stepS821, by using frame t at time t and frame t+1 at time t+1, which areinput, as described above with reference to, for example, FIG. 62, theevaluated value operation unit 812 calculates evaluated value DFD0 inthe case of using a zero vector, and outputs the calculated evaluatedvalue DFD0 to the compensation unit 811.

In step S822, the compensation unit 811 stores evaluated value DFD0 asthe minimum evaluated value in the memory 821. Proceeding to step S823,the compensation unit 811 stores a zero vector as a compensatingcandidate vector in the memory 821. In step S824, the compensation unit811 selects one peripheral pixel from among eight peripheral pixelsaround the pixel of interest selected by the allocated vectordetermining unit 801, and proceeds to step S825. At this time, thecompensation unit 811 selects the eight peripheral pixels from the topleft end pixel in the order of raster scanning.

In step S825, by referring to the allocation flag memory 56, thecompensation unit 811 determines whether the selected peripheral pixelhas a motion vector. If the allocation flag in the allocation flagmemory 56 for the peripheral pixel is one (true), in step S825, thecompensation unit 811 determines that the motion vector allocated to theselected peripheral pixel exists. Proceeding to step S826, thecompensation unit 811 acquires the motion vector of the peripheral pixelfrom the allocated vector memory 55, and the process proceeds to stepS827. Then, the motion vector of the peripheral pixel is output from theallocated vector memory 55 also to the evaluated value operation unit812.

When receiving the motion vector of the peripheral pixel from theallocated vector memory 55, in step S827, by using frame t at time t andframe t+1 at time t+1, which are input, the evaluated value operationunit 812 calculates evaluated value DFD of the motion vector from theallocated vector memory 55, and outputs the calculated evaluated valueDFD to the compensation unit 811. The process proceeds to step S828.

When receiving evaluated value DFD from the evaluated value operationunit 812, in step S828, the compensation unit 811 determines whetherevaluated value DFD is less than the minimum evaluated value of thepixel of interest stored in the memory 821. If it is determined thatevaluated value DFD is less than the minimum evaluated value stored inthe memory 821, the compensation unit 811 proceeds to step S821 andrewrites the minimum evaluated value in the memory 821 by the evaluatedvalue DFD determined to be less than the minimum evaluated value.Proceeding to step S830, the compensation unit 811 rewrites thecompensating candidate vector in the memory 821 by the motion vector forthe minimum evaluated value. The process proceeds to step S831.

If, in step S825, the allocation flag in the allocation flag memory 56for the peripheral pixel is zero (false), the compensation unit 811determines that the selected peripheral pixel has no allocated motionvector, and proceeds to step S831, skipping over steps S826 to S830. Inaddition, if, in step S828, it is determined that evaluated value DFD isequal to or greater than the minimum evaluated value of the pixel ofinterest stored in the memory 821, the compensation unit 811 proceeds tostep S831, skipping over steps S829 and S830.

In step S831, the compensation unit 811 determines whether processing onall the eight peripheral pixels around the pixel of interest hasfinished. If it is determined that the processing on all the eightperipheral pixels around the pixel of interest has not finished, thecompensation unit 811 returns to step S824 and selects the nextperipheral pixel to repeat the subsequent steps. If, in step S831, it isdetermined that the processing on all the eight peripheral pixels aroundthe pixel of interest has finished, the vector compensating process isfinished before returning to step S804 in FIG. 66.

As described above, for a pixel to which a motion vector fails to beallocated by the vector allocating process, by using movementcorrelation, from the motion vectors of peripheral pixels around thepixel, a probable motion vector having the highest reliability based onevaluated value DFD can be obtained. Accordingly, compared with a casein which a zero vector or the like is allocated since a motion vectorcannot be allocated, the accuracy of vector allocation is improved, thussuppressing image discontinuity generated in the image interpolatingprocess.

The allocation flag for a pixel to which a motion vector is allocated bythe above-described allocation compensating process is rewritten by one(true), and the motion vector allocated by the allocation compensatingprocess is used as a compensating candidate vector for the next pixel.Thus, for pixels that substantially identically move, motion vectorshaving substantially identical movements are selected, so that stablemotion vectors having reduced errors can be obtained. As a result, blocknoise, powdery noise, etc., generated in image in the subsequent stage,are reduced to improve image quality.

In addition, for a pixel whose motion vector is to be found, bycalculating evaluated value DFD for a zero vector, and storing thecalculated evaluated value DFD as the minimum evaluated value in memory,time and resources can be efficiently used compared with the case ofcalculating evaluated values DFD of all compensating candidate vectors,and selecting the least evaluated value DFD from among the calculatedevaluated values DFD.

In the above description, the vector compensating process is performedfor pixels to which motion vectors are not allocated by the vectorallocating unit 54. However, for pixels whose motion vectors are notfound by some process, such as pixels (in which zero vectors aredetected) that are not detected by the vector detecting unit 52, thevector compensating process may be performed. Moreover, the vectorcompensating process may be performed for pixels in each of which adetected motion vector or an allocated motion vector is not probable(has low reliability).

Although, in the description of the foregoing embodiment, evaluatedvalue DFD, which is the sum of the absolute values of differences, isused as an evaluated value for motion vector selection, the evaluatedvalue is not limited to evaluated value DFD, but another type of valuemay be used if the reliability of the motion vector can be evaluated.

In addition, although the foregoing embodiment describes that the blockfor performing each process consists of, for example, 8 by 8 pixels, and9 by 9 pixels, these are examples, and the number of pixels constitutingthe block for performing each process is not limited to the abovenumbers of pixels.

Furthermore, although the foregoing embodiment has been described byexemplifying signal conversion from the 24 P signal to 60 P signal, thepresent invention may be applied to, for example, interlaced signalconversion and other frame rate conversion as moving-image framefrequency conversion.

The above-described consecutive processes can be executed either byhardware or by software. When the consecutive processes are executed bysoftware, programs constituting the software are installed from aprogram storage medium to, for example, a computer built into dedicatedhardware, or a multipurpose personal computer in which, by installingvarious types of programs, various types of functions can be executed.

Program storage media for storing programs which are installed into acomputer and, which are made executable by the computer, include, asshown in FIG. 1, removable recording media (package media) including themagnetic disk 31 (including a flexible disk), the optical disk 32, suchas CD-ROM (compact disk read only memory), or DVD (digital versatiledisk), the magneto-optical disk 33 (including MD (MiniDisc)), and thesemiconductor memory 34, and the ROM 12 for temporarily or eternallystoring programs.

In this specification, the steps shown in the flowcharts include, notonly processing steps performed in a time-series manner in accordancewith the order given, but also processing steps which are executed inparallel or separately if not always executed in a time-series manner.

The present application contains subject matter related to Japanesepatent application no. JP 2004-116008, filed in the Japanese PatentOffice on Apr. 9, 2004, the entire contents of which are herebyincorporated herein by reference.

1. An image processing apparatus comprising: effective pixel determiningmeans for determining whether or not each of pixels in an operationblock is effective in detecting a motion vector, the pixels beingsubject to a gradient operation for detecting the motion vector; andgradient operation means for performing the gradient operation by using,among the pixels in the operation block, only pixels determined by saideffective pixel determining means to be effective in detecting themotion vector.
 2. The image processing apparatus according to claim 1,wherein: said effective pixel determining means comprises: temporaldifference calculating means for calculating a temporal pixel differenceof a pixel in the operation block between a first frame being subject todetection of the motion vector and a second frame following the firstframe; and based on the temporal pixel difference calculated by saidtemporal difference calculating means, the pixels in the operation blockare detected either as effective or non-effective in detecting themotion vector.
 3. The image processing apparatus according to claim 2,wherein: said effective pixel determining means further comprises:temporal difference determining means for determining whether or not thetemporal pixel difference calculated by said temporal differencecalculating means is less than a predetermined threshold value; and whensaid temporal difference determining means determines that thecalculated temporal pixel difference is less than the predeterminedthreshold value, said effective pixel determining means determines thatthe pixels in the operation block are effective in detecting the motionvector.
 4. The image processing apparatus according to claim 1, wherein:said effective pixel determining means comprises: firstspatial-difference calculating means for calculating a first spatialpixel difference of a pixel in the operation block in the first framebeing subject to detection of the motion vector; secondspatial-difference calculating means for calculating a second spatialpixel difference of the pixel in the operation block in the second framefollowing the first frame; temporal difference calculating means forcalculating a temporal pixel difference of the pixel in the operationblock between the first frame and the second frame; and based on thefirst and second spatial pixel differences respectively calculated bythe first and second spatial-difference calculating means and based onthe temporal pixel difference calculated by said temporal differencecalculating means, the pixels in the operation block are detected eithereffective or not in detecting the motion vector.
 5. The image processingapparatus according to claim 4, wherein: said effective pixeldetermining means further comprises: gradient similarity determiningmeans for determining whether or not gradient similarity of the pixel isless than a predetermined threshold value, the gradient similarity ofthe pixel being based on the first and second spatial pixel differencesrespectively calculated by the first and second spatial-differencecalculating means and based on the temporal pixel difference calculatedby said temporal difference calculating means; and in a case thegradient similarity of the pixel is less than the predeterminedthreshold value, said effective pixel determining means determines thatthe pixel in the operation block is effective in detecting the motionvector.
 6. The image processing apparatus according to claim 4, wherein:said gradient similarity determining means determines whether or noteach of horizontal gradient similarity and vertical gradient similarity,and horizontal-and-vertical gradient similarity of the pixel, based onthe first and second spatial pixel differences and the temporal pixeldifference, is less than a predetermined threshold value; and in a casesaid gradient similarity determining means determines that at least oneof the horizontal gradient similarity and vertical gradient similarity,and horizontal-and-vertical gradient similarity of the pixel is lessthan the predetermined value, it is determined that the pixel in theoperation block is effective in detecting the motion vector.
 7. Theimage processing apparatus according to claim 4, wherein: said gradientsimilarity determining means determines whether or not each ofhorizontal gradient similarity and vertical gradient similarity of thepixel based on the first and second spatial pixel differences and thetemporal pixel difference is less than a predetermined threshold value;and in a case said gradient similarity determining means determines thatboth the horizontal gradient similarity and vertical gradient similarityof the pixel are less than the threshold value, it is determined thatthe pixel in the operation block is effective in detecting the motionvector.
 8. The image processing apparatus according to claim 1, furthercomprising: pixel quantity determining means for determining whether ornot the number of pixels in the operation block, which is determined bysaid effective pixel determining means to be effective in detecting themotion vector, is less than a predetermined number; and operationcontrol means for controlling processing of one of said effective pixeldetermining means and said gradient operation means based on the resultof determination by said pixel quantity determining means.
 9. The imageprocessing apparatus according to claim 8, wherein: the operation blockcomprises a first operation block portion for detecting the motionvectors in units of blocks and a second operation block portion fordetecting the motion vector in units of pixels; said effective pixeldetermining means determines whether or not the pixels in the firstoperation block portion are effective in detecting the motion vector;and in a case said pixel quantity determining means determines that thenumber of pixels in the first operation block portion, which isdetermined to be effective in detecting the motion vector is greaterthan the predetermined number, said operation control means controlssaid effective pixel determining means and said gradient operation meansto switch processing on the first operation block portion to processingon the second operation block portion for pixels in the first operationblock portion that are determined as non-effective in detecting themotion vector.
 10. The image processing apparatus according to claim 8,wherein, in a case said pixel quantity determining means determines thatthe number of pixels in the operation block, which is determined by saideffective pixel determining means to be effective in detecting themotion vector, is less than the predetermined number, said operationcontrol means controls said gradient operation means to stop thegradient operation.
 11. The image processing apparatus according toclaim 8, wherein: the operation block comprises a first operation blockportion for detecting the motion vector in units of blocks and a secondoperation block portion for detecting the motion vector in units ofpixels; said effective pixel determining means determines whether or notthe pixels in the first operation block portion are effective indetecting the motion vector; said pixel quantity determining meansdetermines whether or not the number of pixels in the first operationblock portion, which is determined by said effective pixel determiningmeans to be effective in detecting the motion vector, is less than thepredetermined number; and in a case said pixel quantity determiningmeans determines that the number of pixels in the first operation blockportion, which is determined to be effective in detecting the motionvector is less than the predetermined number, said operation controlmeans controls said effective pixel determining means and said gradientoperation means to switch processing on the first operation blockportion to processing on the second operation block portion.
 12. Animage processing method for an image processing apparatus for detectingmotion vectors and generating pixel values based on the detected motionvectors, said image processing method comprising: an effective pixeldetermining step of determining whether or not each of pixels in anoperation block is effective in detecting a motion vector, the pixelsbeing subject to gradient operation for detecting the motion vector; anda gradient operation step of performing the gradient operation by using,among the pixels in the operation block, only pixels determined in theeffective pixel determining step to be effective in detecting the motionvector.
 13. A recording medium having a program recorded thereon, theprogram allowing a computer to perform processing for detecting motionvectors and generating pixel values based on the detected motionvectors, the program comprising: an effective pixel determining step ofdetermining whether or not each of pixels in an operation block iseffective in detecting a motion vector, the pixels being subject togradient operation for detecting the motion vector; and a gradientoperation step of performing the gradient operation by using, among thepixels in the operation block, only pixels determined in the effectivepixel determining step to be effective in detecting the motion vector.14. A recording medium having a program recorded thereon, the programallowing a computer to perform processing for detecting motion vectorsand generating pixel values based on the detected motion vectors, theprogram comprising: an effective pixel determining step of determiningwhether or not each of pixels in an operation block is effective indetecting a motion vector, the pixels being subject to gradientoperation for detecting the motion vector; and a gradient operation stepof performing the gradient operation by using, among the pixels in theoperation block, only pixels determined in the effective pixeldetermining step to be effective in detecting the motion vector.
 15. Animage processing apparatus comprising: an effective pixel determing unitconfigured to determine whether or not each of pixels in an operationblock is effective in detecting a motion vector, the pixels beingsubject to a gradient operation for detecting the motion vector; and agradient operation unit configured to perform the gradient operation byusing, among the pixels in the operation block, only pixels determinedby said effective pixels determining unit to be effective in detectingthe motion vector.